2 Copyright 2007 John Maddock.
3 Distributed under the Boost Software License, Version 1.0.
4 (See accompanying file LICENSE_1_0.txt or copy at
5 http://www.boost.org/LICENSE_1_0.txt).
8 [section:value_traits Type Traits that Describe the Properties of a Type]
10 These traits are all /value traits/, which is to say the traits classes all
11 inherit from __integral_constant, and are used to access some numerical
12 property of a type. Often this is a simple true or false Boolean value,
13 but in a few cases may be some other integer value (for example when dealing
14 with type alignments, or array bounds: see `__alignment_of`, `__rank` and `__extent`).
16 [section:primary Categorizing a Type]
18 These traits identify what "kind" of type some type `T` is. These are split into
19 two groups: primary traits which are all mutually exclusive, and composite traits
20 that are compositions of one or more primary traits.
22 For any given type, exactly one primary type trait will inherit from
23 __true_type, and all the others will inherit from __false_type, in other
24 words these traits are mutually exclusive.
26 This means that `__is_integral<T>::value` and `__is_floating_point<T>::value`
27 will only ever be true for built-in types; if you want to check for a
28 user-defined class type that behaves "as if" it is an integral or floating point type,
29 then use the `std::numeric_limits template` instead.
46 struct __is_floating_point;
55 struct __is_member_function_pointer;
58 struct __is_member_object_pointer;
64 struct __is_lvalue_reference;
67 struct __is_rvalue_reference;
75 The following traits are made up of the union of one or more type
76 categorizations. A type may belong to more than one of these categories,
77 in addition to one of the primary categories.
80 struct __is_arithmetic;
86 struct __is_fundamental;
89 struct __is_member_pointer;
95 struct __is_reference;
102 [section:properties General Type Properties]
104 The following templates describe the general properties of a type.
109 struct __alignment_of;
112 struct __has_new_operator;
115 struct __has_nothrow_assign;
118 struct __has_nothrow_constructor;
121 struct __has_nothrow_default_constructor;
124 struct __has_nothrow_copy;
127 struct __has_nothrow_copy_constructor;
130 struct __has_nothrow_destructor;
133 struct __has_trivial_assign;
136 struct __has_trivial_constructor;
139 struct __has_trivial_default_constructor;
142 struct __has_trivial_copy;
145 struct __has_trivial_copy_constructor;
148 struct __has_trivial_destructor;
151 struct __has_virtual_destructor;
154 struct __is_abstract;
156 template <class T, class U>
157 struct __is_assignable;
160 struct __is_copy_constructible;
163 struct __is_copy_assignable;
165 template <class T, class... Args>
166 struct __is_constructible;
169 struct __is_default_constructible;
172 struct __is_destructible;
184 struct __is_stateless;
190 struct __is_polymorphic;
196 struct __is_unsigned;
199 struct __is_volatile;
201 template <class T, std::size_t N = 0>
209 [section:relate Relationships Between Two Types]
211 These templates determine the whether there is a relationship
216 template <class Base, class Derived>
219 template <class Base, class Derived>
220 struct __is_virtual_base_of;
222 template <class From, class To>
223 struct __is_convertible;
225 template <class T, class U>
230 [include operators.qbk]