// // detail/type_traits.hpp // ~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2026 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #ifndef BOOST_ASIO_DETAIL_TYPE_TRAITS_HPP #define BOOST_ASIO_DETAIL_TYPE_TRAITS_HPP #if defined(_MSC_VER) && (_MSC_VER >= 1200) # pragma once #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) #include #include namespace boost { namespace asio { BOOST_ASIO_INLINE_NAMESPACE_BEGIN using std::add_const; template using add_const_t = typename std::add_const::type; using std::add_lvalue_reference; template using add_lvalue_reference_t = typename std::add_lvalue_reference::type; template struct aligned_storage { struct type { alignas(A) unsigned char data[N]; }; }; template using aligned_storage_t = typename aligned_storage::type; using std::alignment_of; using std::conditional; template using conditional_t = typename std::conditional::type; using std::decay; template using decay_t = typename std::decay::type; using std::declval; using std::enable_if; template using enable_if_t = typename std::enable_if::type; using std::false_type; using std::integral_constant; using std::is_base_of; using std::is_class; using std::is_const; using std::is_constructible; using std::is_convertible; using std::is_copy_constructible; using std::is_nothrow_default_constructible; using std::is_destructible; using std::is_function; using std::is_integral; using std::is_move_constructible; using std::is_nothrow_copy_constructible; using std::is_nothrow_copy_assignable; using std::is_nothrow_destructible; using std::is_nothrow_move_constructible; using std::is_nothrow_move_assignable; using std::is_object; using std::is_pointer; using std::is_reference; using std::is_same; using std::is_scalar; using std::is_unsigned; using std::is_void; using std::remove_cv; template using remove_cv_t = typename std::remove_cv::type; template struct remove_cvref : std::remove_cv::type> {}; template using remove_cvref_t = typename remove_cvref::type; using std::remove_pointer; template using remove_pointer_t = typename std::remove_pointer::type; using std::remove_reference; template using remove_reference_t = typename std::remove_reference::type; #if defined(BOOST_ASIO_HAS_STD_INVOKE_RESULT) template struct result_of; template struct result_of : std::invoke_result {}; template using result_of_t = typename result_of::type; #else // defined(BOOST_ASIO_HAS_STD_INVOKE_RESULT) using std::result_of; template using result_of_t = typename std::result_of::type; #endif // defined(BOOST_ASIO_HAS_STD_INVOKE_RESULT) using std::true_type; template struct void_type { typedef void type; }; template using void_t = typename void_type::type; template struct conjunction : true_type {}; template struct conjunction : T {}; template struct conjunction : conditional_t, Head> {}; struct defaulted_constraint { constexpr defaulted_constraint() {} }; template struct constraint : std::enable_if {}; template using constraint_t = typename constraint::type; template struct type_identity { typedef T type; }; template using type_identity_t = typename type_identity::type; BOOST_ASIO_INLINE_NAMESPACE_END } // namespace asio } // namespace boost #endif // BOOST_ASIO_DETAIL_TYPE_TRAITS_HPP