1//
2// is_applicable_property.hpp
3// ~~~~~~~~~~~~~~~~~~~~~~~~~~
4//
5// Copyright (c) 2003-2024 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_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 void_t<
35 enable_if_t<
36 !!Property::template is_applicable_property_v<T>
37 >
38 >> : 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>
55constexpr 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
64

source code of boost/libs/asio/include/boost/asio/is_applicable_property.hpp