]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/boost/asio/detail/type_traits.hpp
update source to Ceph Pacific 16.2.2
[ceph.git] / ceph / src / boost / boost / asio / detail / type_traits.hpp
1 //
2 // detail/type_traits.hpp
3 // ~~~~~~~~~~~~~~~~~~~~~~
4 //
5 // Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com)
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_STD_TYPE_TRAITS)
23 # include <boost/type_traits/add_const.hpp>
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>
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>
35 # include <boost/utility/declval.hpp>
36 # include <boost/utility/enable_if.hpp>
37 # include <boost/utility/result_of.hpp>
38 #endif // defined(BOOST_ASIO_HAS_STD_TYPE_TRAITS)
39
40 namespace boost {
41 namespace asio {
42
43 #if defined(BOOST_ASIO_HAS_STD_TYPE_TRAITS)
44 using std::add_const;
45 using std::conditional;
46 using std::decay;
47 using std::declval;
48 using std::enable_if;
49 using std::false_type;
50 using std::integral_constant;
51 using std::is_base_of;
52 using std::is_class;
53 using std::is_const;
54 using std::is_convertible;
55 using std::is_function;
56 using std::is_same;
57 using std::remove_pointer;
58 using std::remove_reference;
59 #if defined(BOOST_ASIO_HAS_STD_INVOKE_RESULT)
60 template <typename> struct result_of;
61 template <typename F, typename... Args>
62 struct result_of<F(Args...)> : std::invoke_result<F, Args...> {};
63 #else // defined(BOOST_ASIO_HAS_STD_INVOKE_RESULT)
64 using std::result_of;
65 #endif // defined(BOOST_ASIO_HAS_STD_INVOKE_RESULT)
66 using std::true_type;
67 #else // defined(BOOST_ASIO_HAS_STD_TYPE_TRAITS)
68 using boost::add_const;
69 template <bool Condition, typename Type = void>
70 struct enable_if : boost::enable_if_c<Condition, Type> {};
71 using boost::conditional;
72 using boost::decay;
73 using boost::declval;
74 using boost::false_type;
75 using boost::integral_constant;
76 using boost::is_base_of;
77 using boost::is_class;
78 using boost::is_const;
79 using boost::is_convertible;
80 using boost::is_function;
81 using boost::is_same;
82 using boost::remove_pointer;
83 using boost::remove_reference;
84 using boost::result_of;
85 using boost::true_type;
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