Subject: Re: [boost] [naming] standard: bitwise operations in the new standard (20.8.7)
From: Joachim Faulhaber (afojgo_at_[hidden])
Date: 2011-04-30 10:09:26
2011/4/30 Gevorg Voskanyan <v_gevorg_at_[hidden]>:
> Howard Hinnant wrote:
>> On Apr 29, 2011, at 7:53 AM, Christopher Jefferson wrote:
>> > On 29 Apr 2011, at 12:37, Joachim Faulhaber wrote:
>> >> Dear list,
>> >> this posting is addressed specifically to those people who are
>> >> involved in the standardisation process for c++. As far as I know
>> >> Beman, Howard, Dave, Doug, ...
>> >> On occasion of the Boost.TypeTraits extension we were discussing names
>> >> for operators and operator call traits. As an important aspect, naming
>> >> consistency with the standard and across boost libraries has been
>> >> discussed.
>> > Unfortunately, you are a couple of months too late, the final version of the
>>standard has been completed. You could submit a defect report, but I shouldn't
>>think something would be renamed under a defect report, unless there was a good
>>reason for doing so, and being compatible with boost probably isn't a good
>> > bit_and and friends have been in g++ since 2007, so it's really too late to
>>be changing the name now.
>> > Sorry,
>> > Chris
>> >> // 20.8.7, bitwise operations:
>> >> template <class T> struct bit_and;
>> >> template <class T> struct bit_or;
>> >> template <class T> struct bit_xor;
>> >> Since 20.8.7, bitwise operations are *new* in the standard and naming
>> >> consistency would be great for users, do you think there is a chance
>> >> that those 3 names can be changed to
>> >> bitwise_and, bitwise_or, bitwise_xor ?
> As a matter of fact, 'bitand' and 'bitor' have been alternative tokens for & and
> | since at least C++98. I.e. still no "bitwise" in the name.
I know that, but the alternative tokens seem to be somewhat special as
they seem to be designed to be extra short (as direct alternatives for
the short op-signs)...
... nevertheless, thank you all for the clarification of this point.
Since we can not expect, much less enforce, a change in the standard
to "bitwise_" prefix and consistency with the standard should of
course have #1 priority for naming consistency, the Most Unifying
Proposal for the operator name component as in
remains as proposed before.
-- Interval Container Library [Boost.Icl] http://www.joachim-faulhaber.de
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk