11 #ifndef ASIO_TRAITS_STATIC_REQUIRE_HPP 12 #define ASIO_TRAITS_STATIC_REQUIRE_HPP 14 #if defined(_MSC_VER) && (_MSC_VER >= 1200) 16 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 18 #include "asio/detail/config.hpp" 19 #include "asio/detail/type_traits.hpp" 20 #include "asio/traits/static_query.hpp" 22 #if defined(ASIO_HAS_DECLTYPE) \ 23 && defined(ASIO_HAS_NOEXCEPT) 24 # define ASIO_HAS_DEDUCED_STATIC_REQUIRE_TRAIT 1 25 #endif // defined(ASIO_HAS_DECLTYPE) 28 #include "asio/detail/push_options.hpp" 33 template <
typename T,
typename Property,
typename =
void>
36 template <
typename T,
typename Property,
typename =
void>
44 ASIO_STATIC_CONSTEXPR(
bool, is_valid =
false);
47 template <
typename T,
typename Property,
typename =
void>
50 is_same<T, typename decay<T>::type>::value
51 && is_same<Property, typename decay<Property>::type>::value,
53 traits::static_require<
54 typename decay<T>::type,
55 typename decay<Property>::type>
60 #if defined(ASIO_HAS_DEDUCED_STATIC_REQUIRE_TRAIT) 62 #if defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE) 64 template <
typename T,
typename Property>
70 ASIO_STATIC_CONSTEXPR(
bool, is_valid =
true);
73 #else // defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE) 75 false_type static_require_test(...);
77 template <
typename T,
typename Property>
78 true_type static_require_test(T*, Property*,
83 template <
typename T,
typename Property>
84 struct has_static_require
86 ASIO_STATIC_CONSTEXPR(
bool, value =
87 decltype((static_require_test)(
88 static_cast<T*>(0), static_cast<Property*>(0)))::value);
91 template <
typename T,
typename Property>
94 has_static_require<typename decay<T>::type,
95 typename decay<Property>::type>::value
98 ASIO_STATIC_CONSTEXPR(
bool, is_valid =
true);
101 #endif // defined(ASIO_HAS_WORKING_EXPRESSION_SFINAE) 103 #endif // defined(ASIO_HAS_DEDUCED_STATIC_REQUIRE_TRAIT) 108 template <
typename T,
typename Property,
typename>
113 template <
typename T,
typename Property,
typename>
114 struct static_require : static_require_default<T, Property>
121 #include "asio/detail/pop_options.hpp" 123 #endif // ASIO_TRAITS_STATIC_REQUIRE_HPP Definition: static_require.hpp:37
Definition: static_query.hpp:42
Definition: static_require.hpp:34
Definition: any_io_executor.hpp:28
Definition: static_require.hpp:42
Definition: static_require.hpp:48