]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/boost/asio/is_applicable_property.hpp
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / boost / asio / is_applicable_property.hpp
CommitLineData
20effc67
TL
1//
2// is_applicable_property.hpp
3// ~~~~~~~~~~~~~~~~~~~~~~~~~~
4//
1e59de90 5// Copyright (c) 2003-2022 Christopher M. Kohlhoff (chris at kohlhoff dot com)
20effc67
TL
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_IS_APPLICABLE_PROPERTY_HPP
12#define BOOST_ASIO_IS_APPLICABLE_PROPERTY_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#include <boost/asio/detail/type_traits.hpp>
20
21namespace boost {
22namespace asio {
23namespace detail {
24
25template <typename T, typename Property, typename = void>
26struct is_applicable_property_trait : false_type
27{
28};
29
30#if defined(BOOST_ASIO_HAS_VARIABLE_TEMPLATES)
31
32template <typename T, typename Property>
33struct is_applicable_property_trait<T, Property,
34 typename void_type<
35 typename enable_if<
36 !!Property::template is_applicable_property_v<T>
37 >::type
38 >::type> : true_type
39{
40};
41
42#endif // defined(BOOST_ASIO_HAS_VARIABLE_TEMPLATES)
43
44} // namespace detail
45
46template <typename T, typename Property, typename = void>
47struct is_applicable_property :
48 detail::is_applicable_property_trait<T, Property>
49{
50};
51
52#if defined(BOOST_ASIO_HAS_VARIABLE_TEMPLATES)
53
54template <typename T, typename Property>
55BOOST_ASIO_CONSTEXPR const bool is_applicable_property_v
56 = is_applicable_property<T, Property>::value;
57
58#endif // defined(BOOST_ASIO_HAS_VARIABLE_TEMPLATES)
59
60} // namespace asio
61} // namespace boost
62
63#endif // BOOST_ASIO_IS_APPLICABLE_PROPERTY_HPP