
Message du 16/04/11 15:57 De : "Edward Diener" A : boost@lists.boost.org Copie à : Objet : Re: [boost] SFINAE yes_type and no_type
On 4/15/2011 11:13 AM, Jeroen Habraken wrote:
Hi,
Is there a specific yes_type and no_type inside boost that I should be using when writing a SFINAE test? There seem to be quite a few defined already and reinventing the wheel (albeit it being trivial) again doesn't make sense.
For the Boost developer there is:
#include
you then have:
::boost::type_traits::yes_type ::boost::type_traits::no_type
Of course the intention of 'detail' for a library is that the code should only be used by that library, but I think, in this case, it is allowable for other Boost library developers to use it also.
But since this is a part of type traits detail it is not meant to be used outside of a Boost library ( ie. by end-users ).
It would perhaps be better if ::boost::type_traits::yes_type and ::boost::type_traits::no_type were put into its own utility classes to make it more apparent that Boost library developers and end-users of Boost could use it.
OTOH it might be presumptuous of me to suggest that it be used at all outside of type traits, but I have used it in my own TTI sandbox library anyway since type traits itself is used heavily there.
Hi, even if these two classes don't add too much I don't see any problem if they are moved to Boost.TypeTraits. John? Best, Vicente