Subject: Re: [boost] [naming] standard: bitwise operations in the new standard (20.8.7)
From: Gevorg Voskanyan (v_gevorg_at_[hidden])
Date: 2011-04-30 09:00:03
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.
> >> Best regards,
> >> Joachim
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk