开发者

C++ Type Traits Overview [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 11 years ago.

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_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.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜