1//
2// detail/type_traits.hpp
3// ~~~~~~~~~~~~~~~~~~~~~~
4//
5// Copyright (c) 2003-2015 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_TYPE_TRAITS)
23# include <boost/type_traits/add_const.hpp>
24# include <boost/type_traits/is_const.hpp>
25# include <boost/type_traits/is_convertible.hpp>
26# include <boost/type_traits/is_function.hpp>
27# include <boost/type_traits/is_same.hpp>
28# include <boost/type_traits/remove_pointer.hpp>
29# include <boost/type_traits/remove_reference.hpp>
30# include <boost/utility/enable_if.hpp>
31#endif // defined(BOOST_ASIO_HAS_TYPE_TRAITS)
32
33namespace boost {
34namespace asio {
35
36#if defined(BOOST_ASIO_HAS_STD_TYPE_TRAITS)
37using std::add_const;
38using std::enable_if;
39using std::is_const;
40using std::is_convertible;
41using std::is_function;
42using std::is_same;
43using std::remove_pointer;
44using std::remove_reference;
45#else // defined(BOOST_ASIO_HAS_STD_TYPE_TRAITS)
46using boost::add_const;
47template <bool Condition, typename Type = void>
48struct enable_if : boost::enable_if_c<Condition, Type> {};
49using boost::is_const;
50using boost::is_convertible;
51using boost::is_function;
52using boost::is_same;
53using boost::remove_pointer;
54using boost::remove_reference;
55#endif // defined(BOOST_ASIO_HAS_STD_TYPE_TRAITS)
56
57} // namespace asio
58} // namespace boost
59
60#endif // BOOST_ASIO_DETAIL_TYPE_TRAITS_HPP
61