
9 Sep
2011
9 Sep
'11
2:59 p.m.
If you don't want the operators, then don't use them. Having an extra template parameter to disable them seems rather pointless.
Steven, That, in my view, is the same argument as saying that "a bidirectional iterator should have an operator +=, but just don't use it". Why doesn't the STL provide it? Because it would lead to surprises when people expecting a quick operation end up getting something much more expensive. While the algorithmic complexity of the endian operators may not quite cause the difference between O(1) and O(N), I think it's teetering in the same territory. Cheers, Tom