|
Boost : |
Subject: Re: [boost] [Review] Type Traits Extension by Frederic Bron - Review summary and decision
From: Daniel Herring (dherring_at_[hidden])
Date: 2011-03-29 11:31:01
On Tue, 29 Mar 2011, Dave Abrahams wrote:
> At Sun, 27 Mar 2011 15:07:17 -0700,
> Jeffrey Lee Hellrung, Jr. wrote:
>>
>> 2011/3/27 Frédéric Bron <frederic.bron_at_[hidden]>
>>
>> > > - The main recurring suggestions found was the choice of name for the
>> > > operator traits with respect to the standard naming, naming in proto and
>> > > other boost libraries.
>> > > * Frederic and a few other seems to favor the proto naming scheme (more
>> > or
>> > > less the negate issue and the pre/post operator)
>> > > * the question of a common prefix is still open
>> >
>> > What about is_callable_plus, is_callable_plus_assign, ...
>> > i.e. is_callable_xxxx where xxxx the same as in Boost.Proto?
>> >
>> > I know that is_xxxx_callable reads better but I like to have a common
>> > prefix longer than is_.
>> >
>>
>> I think this is worse than has_operator_xxx or is_xxxable.
>
> The C++ standard proposal for concepts used HasXXX
> (e.g. HasRightShift) for such syntactic tests (see
> http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2008/n2502.pdf). I
> think the word "_operator_" doesn't add much here.
I anticipate facing a chunk of templated code and saying something like
"these templates are breaking for type T, what operators are they
dispatching on?".
# grep -r have_op_ headers
Short, distinctive names may help with the code archaeology side of
things.
Later,
Daniel
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk