Boost logo

Boost :

Subject: Re: [boost] [Review] Type Traits Extension by Frederic Bron - Review summary and decision
From: Matt Calabrese (rivorus_at_[hidden])
Date: 2011-05-23 14:42:02


Perhaps I'm too late to influence anything, but during my talk at BoostCon,
Rob Stewart brought this thread up as it relates to my Generic library. The
truth is, I've sort of purposely been staying away from the thread until now
because I loathe these types of discussions, but I suppose that I should at
least poke my head in and voice my opinion.

That said, I hate to make things more complicated, but I faced this operator
naming problem when making my Generic library and I used the names specified
in N2914 (the last working paper that had concepts), only I converted
everything to all lower-case with underscores for spaces. This is similar to
what Dave suggested here:

On Tue, Mar 29, 2011 at 8:11 AM, Dave Abrahams <dave_at_[hidden]> wrote:

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

If anyone wants to see all of the operator names that I used in one place,
as based on N2914, see slide 67 of my talk:
https://github.com/boostcon/2011_presentations/raw/master/thu/Boost.Generic.pdf

The only ones on that table that don't come directly from N2914 are the ones
that didn't have an associated "HasXXX" concept, which are, iirc,

->
->*
new
new[]
delete
delete[]

For the above few operators I just picked names that made the most sense to
me and I doubt there is much controversy with respect to them anyway.

The operator() concept also used a different concept name in N2914 (it's not
HasCall, it's Callable), and so I settled on simply "call".

As I mentioned, there was a very brief discussion of this thread and my
rationale during the talk, so I'll link that whenever the video becomes
available. In short, given that these names were all listed in the last
working paper which had concepts, I'd say that they are the closest thing
that we have to a complete and consistent set of operator names in the
standard. At the very least, I present the above list as a reference for the
names that C++0x concepts would have used had they not been cut.

-- 
-Matt Calabrese

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk