>().query(static_cast(p))
)
)
-> decltype(
declval>().query(static_cast(p))
);
};
#else // defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
typedef T type;
#endif // defined(ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT)
};
template
ASIO_NODISCARD constexpr enable_if_t<
call_traits::overload == static_value,
typename call_traits::result_type
>
operator()(T&&, Property&&) const
noexcept(call_traits::is_noexcept)
{
return static_query, decay_t>::value();
}
template
ASIO_NODISCARD constexpr enable_if_t<
call_traits::overload == call_member,
typename call_traits::result_type
>
operator()(T&& t, Property&& p) const
noexcept(call_traits::is_noexcept)
{
return static_cast(t).query(static_cast(p));
}
template
ASIO_NODISCARD constexpr enable_if_t<
call_traits::overload == call_free,
typename call_traits::result_type
>
operator()(T&& t, Property&& p) const
noexcept(call_traits::is_noexcept)
{
return query(static_cast(t), static_cast(p));
}
};
template
struct static_instance
{
static const T instance;
};
template
const T static_instance::instance = {};
} // namespace asio_query_fn
namespace asio {
namespace {
static constexpr const asio_query_fn::impl&
query = asio_query_fn::static_instance<>::instance;
} // namespace
typedef asio_query_fn::impl query_t;
template
struct can_query :
integral_constant::overload !=
asio_query_fn::ill_formed>
{
};
#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
template
constexpr bool can_query_v = can_query::value;
#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
template
struct is_nothrow_query :
integral_constant::is_noexcept>
{
};
#if defined(ASIO_HAS_VARIABLE_TEMPLATES)
template
constexpr bool is_nothrow_query_v = is_nothrow_query::value;
#endif // defined(ASIO_HAS_VARIABLE_TEMPLATES)
template
struct query_result
{
typedef typename asio_query_fn::call_traits<
query_t, T, void(Property)>::result_type type;
};
template
using query_result_t = typename query_result::type;
} // namespace asio
#endif // defined(GENERATING_DOCUMENTATION)
#include "asio/detail/pop_options.hpp"
#endif // ASIO_QUERY_HPP