
On 3/14/2011 12:48 AM, Joel Falcou wrote:
Dear All,
This is the first day of the fast track review of Frédéric Bron's extensions to the Type Traits Library.This reviews will last until March 18th, 2011 under my management. All comments and reviews are very welcome. [...]
(Review to come eventually...) I'm browsing the source, and don't see a lot of difference between detail/has_postfix_operator.hpp and detail/has_prefix_operator.hpp. Frederic (excuse the lack of accents), are the only differences the operator overload declaration and the location of BOOST_TT_TRAIT_OP relative to make<LHS>() or make<RHS>()? If so, for maintenance purposes, it may be wise to combine the 2 headers. What is the community's feeling about adding a 3rd template parameter (or some other equivalent interface) to constrain the result type of the operator other than "is convertible to"? E.g., I've proposed adding the ability to pass a Boost.MPL metafunction to evaluate on the result type of the operation. One could use some other mechanism if one doesn't wish to couple Boost.TypeTraits to Boost.MPL. I'm motivated by the fact that, although checking convertibility seems like the most common use case (and the current interface is what I'd expect it to look like), one may want to constrain the result type further. For example, checking for an exact type match, or checking for rvalueness/lvalueness. I'd be willing to help add this capability, but if there is little or no support for it, then it needn't be further pursued. - Jeff