11 #ifndef ASIO_DETAIL_TYPE_TRAITS_HPP 12 #define ASIO_DETAIL_TYPE_TRAITS_HPP 14 #if defined(_MSC_VER) && (_MSC_VER >= 1200) 16 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 18 #include "asio/detail/config.hpp" 20 #if defined(ASIO_HAS_STD_TYPE_TRAITS) 21 # include <type_traits> 22 #else // defined(ASIO_HAS_STD_TYPE_TRAITS) 23 # include <boost/type_traits/add_const.hpp> 24 # include <boost/type_traits/add_lvalue_reference.hpp> 25 # include <boost/type_traits/aligned_storage.hpp> 26 # include <boost/type_traits/alignment_of.hpp> 27 # include <boost/type_traits/conditional.hpp> 28 # include <boost/type_traits/decay.hpp> 29 # include <boost/type_traits/has_nothrow_copy.hpp> 30 # include <boost/type_traits/has_nothrow_destructor.hpp> 31 # include <boost/type_traits/integral_constant.hpp> 32 # include <boost/type_traits/is_base_of.hpp> 33 # include <boost/type_traits/is_class.hpp> 34 # include <boost/type_traits/is_const.hpp> 35 # include <boost/type_traits/is_convertible.hpp> 36 # include <boost/type_traits/is_constructible.hpp> 37 # include <boost/type_traits/is_copy_constructible.hpp> 38 # include <boost/type_traits/is_destructible.hpp> 39 # include <boost/type_traits/is_function.hpp> 40 # include <boost/type_traits/is_object.hpp> 41 # include <boost/type_traits/is_same.hpp> 42 # include <boost/type_traits/remove_cv.hpp> 43 # include <boost/type_traits/remove_pointer.hpp> 44 # include <boost/type_traits/remove_reference.hpp> 45 # include <boost/utility/declval.hpp> 46 # include <boost/utility/enable_if.hpp> 47 # include <boost/utility/result_of.hpp> 48 #endif // defined(ASIO_HAS_STD_TYPE_TRAITS) 52 #if defined(ASIO_HAS_STD_TYPE_TRAITS) 54 using std::add_lvalue_reference;
55 using std::aligned_storage;
56 using std::alignment_of;
57 using std::conditional;
61 using std::false_type;
62 using std::integral_constant;
63 using std::is_base_of;
66 using std::is_constructible;
67 using std::is_convertible;
68 using std::is_copy_constructible;
69 using std::is_destructible;
70 using std::is_function;
71 using std::is_move_constructible;
72 using std::is_nothrow_copy_constructible;
73 using std::is_nothrow_destructible;
75 using std::is_reference;
80 struct remove_cvref : remove_cv<typename std::remove_reference<T>::type> {};
81 using std::remove_pointer;
82 using std::remove_reference;
83 #if defined(ASIO_HAS_STD_INVOKE_RESULT) 84 template <
typename>
struct result_of;
85 template <
typename F,
typename... Args>
86 struct result_of<F(Args...)> : std::invoke_result<F, Args...> {};
87 #else // defined(ASIO_HAS_STD_INVOKE_RESULT) 89 #endif // defined(ASIO_HAS_STD_INVOKE_RESULT) 91 #else // defined(ASIO_HAS_STD_TYPE_TRAITS) 92 using boost::add_const;
93 using boost::add_lvalue_reference;
94 using boost::aligned_storage;
95 using boost::alignment_of;
96 template <
bool Condition,
typename Type =
void>
97 struct enable_if : boost::enable_if_c<Condition, Type> {};
98 using boost::conditional;
100 using boost::declval;
101 using boost::false_type;
102 using boost::integral_constant;
103 using boost::is_base_of;
104 using boost::is_class;
105 using boost::is_const;
106 using boost::is_constructible;
107 using boost::is_convertible;
108 using boost::is_copy_constructible;
109 using boost::is_destructible;
110 using boost::is_function;
111 #if defined(ASIO_HAS_MOVE) 112 template <
typename T>
114 #else // defined(ASIO_HAS_MOVE) 115 template <
typename T>
117 #endif // defined(ASIO_HAS_MOVE) 118 template <
typename T>
120 template <
typename T>
122 using boost::is_object;
123 using boost::is_reference;
124 using boost::is_same;
125 using boost::is_scalar;
126 using boost::remove_cv;
127 template <
typename T>
128 struct remove_cvref : remove_cv<typename boost::remove_reference<T>::type> {};
129 using boost::remove_pointer;
130 using boost::remove_reference;
131 using boost::result_of;
132 using boost::true_type;
133 #endif // defined(ASIO_HAS_STD_TYPE_TRAITS) 135 template <
typename>
struct void_type {
typedef void type; };
137 #if defined(ASIO_HAS_VARIADIC_TEMPLATES) 139 template <
typename...>
struct conjunction : true_type {};
140 template <
typename T>
struct conjunction<T> : T {};
141 template <
typename Head,
typename... Tail>
struct conjunction<Head, Tail...> :
142 conditional<Head::value, conjunction<Tail...>, Head>::type {};
144 #endif // defined(ASIO_HAS_VARIADIC_TEMPLATES) 148 #endif // ASIO_DETAIL_TYPE_TRAITS_HPP Definition: type_traits.hpp:121
Definition: type_traits.hpp:135
Definition: type_traits.hpp:119
Definition: type_traits.hpp:97
Definition: type_traits.hpp:116
Definition: type_traits.hpp:128
Definition: any_io_executor.hpp:28