2 // Copyright (c) 2013-2017 Vinnie Falco (vinnie dot falco at gmail dot com)
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)
8 #ifndef BEAST_BUFFER_CONCEPTS_HPP
9 #define BEAST_BUFFER_CONCEPTS_HPP
11 #include <beast/config.hpp>
12 #include <beast/core/detail/buffer_concepts.hpp>
13 #include <boost/asio/buffer.hpp>
14 #include <type_traits>
18 /// Determine if `T` meets the requirements of @b `BufferSequence`.
19 template<class T, class BufferType>
21 struct is_BufferSequence : std::integral_constant<bool, ...>
23 struct is_BufferSequence : detail::is_BufferSequence<T, BufferType>::type
28 /// Determine if `T` meets the requirements of @b `ConstBufferSequence`.
31 struct is_ConstBufferSequence : std::integral_constant<bool, ...>
33 struct is_ConstBufferSequence :
34 is_BufferSequence<T, boost::asio::const_buffer>
39 /// Determine if `T` meets the requirements of @b `DynamicBuffer`.
42 struct is_DynamicBuffer : std::integral_constant<bool, ...>
44 struct is_DynamicBuffer : detail::is_DynamicBuffer<T>::type
49 /// Determine if `T` meets the requirements of @b `MutableBufferSequence`.
52 struct is_MutableBufferSequence : std::integral_constant<bool, ...>
54 struct is_MutableBufferSequence :
55 is_BufferSequence<T, boost::asio::mutable_buffer>