|
Boost : |
Subject: Re: [boost] review request: addition to type_traits library ofhas_operator_xxx
From: John Maddock (boost.regex_at_[hidden])
Date: 2010-11-20 05:01:03
My apologies for coming late to this discussion, I appear to have reached my
"bandwidth limit" for the max number of simultaneous discussions - not that
that's all that hard :-(
A couple of observations:
* I'll go with the consensus on naming, and if that means changing the names
of existing traits, then so be it - as long as the names that are part of
the std draft remain unchanged.
* Personally I prefer either has_XXX_operator or has_operator_XXX to the
namespace approach. The latter has the advantage of grouping all the
operator test names together in the alphabetical index, the former reads
easier and more descriptively to me (we can always add a new section to the
"type types by category" section of docs). But <shrug> I guess.
* I'm not that keen on the operators:: subnamespace, to me that namespace is
reserved for the operators library
http://www.boost.org/doc/libs/1_45_0/libs/utility/operators.htm it would
have to be boost::type_traits::operators I guess which is rather less cute
:-(
* If boost::is_convertible doesn't work as required for this library, then
we should fix it, not reinvent it. We already have a lot of compiler
workarounds and acumulated knowledge in that version, it would be a shame to
loose that by reinventing the wheel.
Other than that, it would be really good to finally see comprehensive
operator testing in type_traits.
Regards, John.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk