Boost logo

Boost :

Subject: Re: [boost] type traits not in boost.type_traits
From: John Maddock (boost.regex_at_[hidden])
Date: 2011-02-26 12:59:38


> Have you looked for compound traits in other libraries that could be added
> to TypeTraits for convenience? That is, if it is very common to combine
> certain traits, then a single trait that captures the compound would
> simplify a good deal of code.

>I checked a bit more for duplicates:
>* these are duplicate:
> . boost/detail/has_default_constructor.hpp and
>boost/type_traits/has_trivial_constructor.hpp

No default and trivial constructors are quite different things, note that
there is no way to check for a default constructor within C++03 either.

BTW I can't find any file using this trait?

> . boost/type_traits/is_float.hpp and
>boost/type_traits/is_floating_point.hpp (is_float is not in the
>documentation)

is_float is depricated and deliberately removed from the docs, it remains
for the sake of legacy code, is_floating_point is the new shiny C++0x name
:-)

There are a few others like that in type traits.

>* these would be nice to have in type_traits
> . boost/mpl/math/is_even.hpp

It's not a type-trait, just a bit of numerical meta-programming ;-)

HTH, John.


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