Boost logo

Boost :

Subject: Re: [boost] [Endian] Review
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2011-09-09 13:25:20


On 09/09/2011 07:59 AM, Tomas Puverle wrote:
>> 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".

It isn't the same at all. I was really
responding to the suggestion of having
a template parameter that determines whether
they should be provided. I don't really
have an opinion on whether the operators
should be provided or not. IMHO, this
half-way thing of optionally providing them
is liable to cause more confusion than
always providing them.

> 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.

In Christ,
Steven Watanabe

Boost list run by bdawes at, gregod at, cpdaniel at, john at