/usr/include/boost/beast/core/detail
Edit: /usr/include/boost/beast/core/detail/is_invocable.hpp (1888B)
//
// Copyright (c) 2016-2019 Vinnie Falco (vinnie dot falco at gmail dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
// Official repository: https://github.com/boostorg/beast
//
#ifndef BOOST_BEAST_DETAIL_IS_INVOCABLE_HPP
#define BOOST_BEAST_DETAIL_IS_INVOCABLE_HPP
#include
#include
#include
#include
namespace boost {
namespace beast {
namespace detail {
template
auto
is_invocable_test(C&& c, int, A&& ...a)
-> decltype(std::is_convertible<
decltype(c(std::forward(a)...)), R>::value ||
std::is_same::value,
std::true_type());
template
std::false_type
is_invocable_test(C&& c, long, A&& ...a);
/** Metafunction returns `true` if F callable as R(A...)
Example:
@code
is_invocable::value
@endcode
*/
/** @{ */
template
struct is_invocable : std::false_type
{
};
template
struct is_invocable
: decltype(is_invocable_test(
std::declval(), 1, std::declval()...))
{
};
/** @} */
template
struct is_completion_token_for : std::false_type
{
};
struct any_initiation
{
template
void operator()(AnyArgs&&...);
};
template
struct is_completion_token_for<
CompletionToken, R(Args...), boost::void_t(
any_initiation(), std::declval())
)>> : std::true_type
{
};
} // detail
} // beast
} // boost
#endif