Question

Has anybody put together a list of all the type traits available in standard <type_traits> (GCC-4.6.1) and Boost's own <boost/type_traits.hpp>?

Was it helpful?

Solution

The full lists of traits are available online:

However, the GCC implementation is not yet complete. GCC 4.6 is missing:

  • The std::underlying_type trait. This one will be on GCC 4.7.
  • The std::is_trivially_X series of traits. Instead it has std::has_trivial_default_constructor and similar that seem to have the name from an earlier draft. The one about the move constructor is missing.
  • The std::is_nothrow_X series of traits. These also use an older name like std::has_nothrow_default_constructor. The one about the move constructor is missing too.
  • The std::aligned_union trait. This one can be easily implemented in terms of std::aligned_storage, which is currently supported.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top