]>
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_BUFFER_CONCEPTS_HPP | |
9 | #define BEAST_BUFFER_CONCEPTS_HPP | |
10 | ||
11 | #include <beast/config.hpp> | |
12 | #include <beast/core/detail/buffer_concepts.hpp> | |
13 | #include <boost/asio/buffer.hpp> | |
14 | #include <type_traits> | |
15 | ||
16 | namespace beast { | |
17 | ||
18 | /// Determine if `T` meets the requirements of @b `BufferSequence`. | |
19 | template<class T, class BufferType> | |
20 | #if BEAST_DOXYGEN | |
21 | struct is_BufferSequence : std::integral_constant<bool, ...> | |
22 | #else | |
23 | struct is_BufferSequence : detail::is_BufferSequence<T, BufferType>::type | |
24 | #endif | |
25 | { | |
26 | }; | |
27 | ||
28 | /// Determine if `T` meets the requirements of @b `ConstBufferSequence`. | |
29 | template<class T> | |
30 | #if BEAST_DOXYGEN | |
31 | struct is_ConstBufferSequence : std::integral_constant<bool, ...> | |
32 | #else | |
33 | struct is_ConstBufferSequence : | |
34 | is_BufferSequence<T, boost::asio::const_buffer> | |
35 | #endif | |
36 | { | |
37 | }; | |
38 | ||
39 | /// Determine if `T` meets the requirements of @b `DynamicBuffer`. | |
40 | template<class T> | |
41 | #if BEAST_DOXYGEN | |
42 | struct is_DynamicBuffer : std::integral_constant<bool, ...> | |
43 | #else | |
44 | struct is_DynamicBuffer : detail::is_DynamicBuffer<T>::type | |
45 | #endif | |
46 | { | |
47 | }; | |
48 | ||
49 | /// Determine if `T` meets the requirements of @b `MutableBufferSequence`. | |
50 | template<class T> | |
51 | #if BEAST_DOXYGEN | |
52 | struct is_MutableBufferSequence : std::integral_constant<bool, ...> | |
53 | #else | |
54 | struct is_MutableBufferSequence : | |
55 | is_BufferSequence<T, boost::asio::mutable_buffer> | |
56 | #endif | |
57 | { | |
58 | }; | |
59 | ||
60 | } // beast | |
61 | ||
62 | #endif |