// // 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_TYPE_TRAITS_HPP #define BOOST_BEAST_TYPE_TRAITS_HPP #ifndef BOOST_BEAST_DOXYGEN #include #include #include #include BOOST_PRAGMA_MESSAGE(" is DEPRECATED and will be removed in a future release.") namespace boost { namespace beast { /** Determine if `T` meets the requirements of CompletionHandler. This trait checks whether a type meets the requirements for a completion handler, and is also callable with the specified signature. Metafunctions are used to perform compile time checking of template types. This type will be `std::true_type` if `T` meets the requirements, else the type will be `std::false_type`. @par Example Use with `static_assert`: @code struct handler { void operator()(error_code&); }; static_assert(is_completion_handler::value, "Not a completion handler"); @endcode */ template #if BOOST_BEAST_DOXYGEN using is_completion_handler = __see_below__ #else using is_completion_handler = std::integral_constant::type>::value && detail::is_invocable::value>; #endif } // beast } // boost #endif #endif