C++ Type Traits Overview [closed]
Has anybody put together a list of all the type traits a开发者_运维百科vailable in standard <type_traits> (GCC-4.6.1) and Boost's own <boost/type_traits.hpp>?
The full lists of traits are available online:
- The Boost documentation lists the traits in
<boost/type_traits.hpp>; - The C++0x draft lists the traits in
<type_traits>.
However, the GCC implementation is not yet complete. GCC 4.6 is missing:
- The
std::underlying_typetrait. This one will be on GCC 4.7. - The
std::is_trivially_Xseries of traits. Instead it hasstd::has_trivial_default_constructorand similar that seem to have the name from an earlier draft. The one about the move constructor is missing. - The
std::is_nothrow_Xseries of traits. These also use an older name likestd::has_nothrow_default_constructor. The one about the move constructor is missing too. - The
std::aligned_uniontrait. This one can be easily implemented in terms ofstd::aligned_storage, which is currently supported.
加载中,请稍侯......
精彩评论