1 // (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
2 // Permission to copy, use, modify, sell and
3 // distribute this software is granted provided this copyright notice appears
4 // in all copies. This software is provided "as is" without express or implied
5 // warranty, and with no claim as to its suitability for any purpose.
7 // See http://www.boost.org for most recent version including documentation.
9 // forward declarations of type_traits classes
11 #ifndef BOOST_FWD_TYPE_TRAITS_HPP
12 #define BOOST_FWD_TYPE_TRAITS_HPP
17 #ifndef BOOST_CONFIG_HPP
18 #include <boost/config.hpp>
22 // Helper macros for builtin compiler support.
23 // If your compiler has builtin support for any of the following
24 // traits concepts, then redefine the appropriate macros to pick
25 // up on the compiler support:
27 // (these should largely ignore cv-qualifiers)
28 // BOOST_IS_CLASS(T) should evaluate to true if T is a class or struct type
29 // BOOST_IS_ENUM(T) should evaluate to true if T is an enumerator type
30 // BOOST_IS_UNION(T) should evaluate to true if T is a union type
31 // BOOST_IS_POD(T) should evaluate to true if T is a POD type
32 // BOOST_IS_EMPTY(T) should evaluate to true if T is an empty struct or union
33 // BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) should evaluate to true if "T x;" has no effect
34 // BOOST_HAS_TRIVIAL_COPY(T) should evaluate to true if T(t) <==> memcpy
35 // BOOST_HAS_TRIVIAL_ASSIGN(T) should evaluate to true if t = u <==> memcpy
36 // BOOST_HAS_TRIVIAL_DESTRUCTOR(T) should evaluate to true if ~T() has no effect
38 #define BOOST_IS_CLASS(T) false
39 #define BOOST_IS_ENUM(T) false
40 #define BOOST_IS_UNION(T) false
41 #define BOOST_IS_POD(T) false
42 #define BOOST_IS_EMPTY(T) false
43 #define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) false
44 #define BOOST_HAS_TRIVIAL_COPY(T) false
45 #define BOOST_HAS_TRIVIAL_ASSIGN(T) false
46 #define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) false
51 // forward declare all type traits templates here
53 // conversion_traits.hpp:
54 template <class From, class To>
55 struct is_convertible;
56 // alignment_traits.hpp:
59 // arithmetic_traits.hpp:
69 struct is_fundamental;
79 struct remove_volatile;
83 // composite_traits.hpp:
91 struct is_member_pointer;
109 struct has_trivial_constructor;
111 struct has_trivial_copy;
113 struct has_trivial_assign;
115 struct has_trivial_destructor;
119 // transform_traits.hpp:
121 struct remove_reference;
123 struct add_reference;
125 struct remove_bounds;
127 struct remove_pointer;
132 template <class T, class U>
137 #endif // BOOST_FWD_TYPE_TRAITS_HPP