]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | // |
2 | // Copyright (c) 2013-2017 Vinnie Falco (vinnie dot falco at gmail dot com) | |
3 | // | |
4 | // Distributed under the Boost Software License, Version 1.0. (See accompanying | |
5 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | |
6 | // | |
7 | ||
8 | #ifndef BEAST_HANDLER_CONCEPTS_HPP | |
9 | #define BEAST_HANDLER_CONCEPTS_HPP | |
10 | ||
11 | #include <beast/config.hpp> | |
12 | #include <beast/core/detail/is_call_possible.hpp> | |
13 | #include <type_traits> | |
14 | ||
15 | namespace beast { | |
16 | ||
17 | /// Determine if `T` meets the requirements of @b `CompletionHandler`. | |
18 | template<class T, class Signature> | |
19 | #if BEAST_DOXYGEN | |
20 | using is_CompletionHandler = std::integral_constant<bool, ...>; | |
21 | #else | |
22 | using is_CompletionHandler = std::integral_constant<bool, | |
23 | std::is_copy_constructible<typename std::decay<T>::type>::value && | |
24 | detail::is_call_possible<T, Signature>::value>; | |
25 | #endif | |
26 | } // beast | |
27 | ||
28 | #endif |