]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/boost/asio/detail/type_traits.hpp
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / boost / boost / asio / detail / type_traits.hpp
CommitLineData
7c673cae
FG
1//
2// detail/type_traits.hpp
3// ~~~~~~~~~~~~~~~~~~~~~~
4//
92f5a8d4 5// Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com)
7c673cae
FG
6//
7// Distributed under the Boost Software License, Version 1.0. (See accompanying
8// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
9//
10
11#ifndef BOOST_ASIO_DETAIL_TYPE_TRAITS_HPP
12#define BOOST_ASIO_DETAIL_TYPE_TRAITS_HPP
13
14#if defined(_MSC_VER) && (_MSC_VER >= 1200)
15# pragma once
16#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
17
18#include <boost/asio/detail/config.hpp>
19
20#if defined(BOOST_ASIO_HAS_STD_TYPE_TRAITS)
21# include <type_traits>
22#else // defined(BOOST_ASIO_HAS_TYPE_TRAITS)
23# include <boost/type_traits/add_const.hpp>
b32b8144
FG
24# include <boost/type_traits/conditional.hpp>
25# include <boost/type_traits/decay.hpp>
26# include <boost/type_traits/integral_constant.hpp>
27# include <boost/type_traits/is_base_of.hpp>
28# include <boost/type_traits/is_class.hpp>
7c673cae
FG
29# include <boost/type_traits/is_const.hpp>
30# include <boost/type_traits/is_convertible.hpp>
31# include <boost/type_traits/is_function.hpp>
32# include <boost/type_traits/is_same.hpp>
33# include <boost/type_traits/remove_pointer.hpp>
34# include <boost/type_traits/remove_reference.hpp>
92f5a8d4 35# include <boost/utility/declval.hpp>
7c673cae 36# include <boost/utility/enable_if.hpp>
b32b8144 37# include <boost/utility/result_of.hpp>
7c673cae
FG
38#endif // defined(BOOST_ASIO_HAS_TYPE_TRAITS)
39
40namespace boost {
41namespace asio {
42
43#if defined(BOOST_ASIO_HAS_STD_TYPE_TRAITS)
44using std::add_const;
b32b8144
FG
45using std::conditional;
46using std::decay;
92f5a8d4 47using std::declval;
7c673cae 48using std::enable_if;
b32b8144
FG
49using std::false_type;
50using std::integral_constant;
51using std::is_base_of;
52using std::is_class;
7c673cae
FG
53using std::is_const;
54using std::is_convertible;
55using std::is_function;
56using std::is_same;
57using std::remove_pointer;
58using std::remove_reference;
11fdf7f2
TL
59#if defined(BOOST_ASIO_HAS_STD_INVOKE_RESULT)
60template <typename> struct result_of;
61template <typename F, typename... Args>
62struct result_of<F(Args...)> : std::invoke_result<F, Args...> {};
63#else // defined(BOOST_ASIO_HAS_STD_INVOKE_RESULT)
b32b8144 64using std::result_of;
11fdf7f2 65#endif // defined(BOOST_ASIO_HAS_STD_INVOKE_RESULT)
b32b8144 66using std::true_type;
7c673cae
FG
67#else // defined(BOOST_ASIO_HAS_STD_TYPE_TRAITS)
68using boost::add_const;
69template <bool Condition, typename Type = void>
70struct enable_if : boost::enable_if_c<Condition, Type> {};
b32b8144
FG
71using boost::conditional;
72using boost::decay;
92f5a8d4 73using boost::declval;
b32b8144
FG
74using boost::false_type;
75using boost::integral_constant;
76using boost::is_base_of;
77using boost::is_class;
7c673cae
FG
78using boost::is_const;
79using boost::is_convertible;
80using boost::is_function;
81using boost::is_same;
82using boost::remove_pointer;
83using boost::remove_reference;
b32b8144
FG
84using boost::result_of;
85using boost::true_type;
7c673cae
FG
86#endif // defined(BOOST_ASIO_HAS_STD_TYPE_TRAITS)
87
88} // namespace asio
89} // namespace boost
90
91#endif // BOOST_ASIO_DETAIL_TYPE_TRAITS_HPP