]> git.proxmox.com Git - ceph.git/blame - ceph/src/Beast/include/beast/core/buffer_concepts.hpp
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / Beast / include / beast / core / buffer_concepts.hpp
CommitLineData
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
16namespace beast {
17
18/// Determine if `T` meets the requirements of @b `BufferSequence`.
19template<class T, class BufferType>
20#if BEAST_DOXYGEN
21struct is_BufferSequence : std::integral_constant<bool, ...>
22#else
23struct is_BufferSequence : detail::is_BufferSequence<T, BufferType>::type
24#endif
25{
26};
27
28/// Determine if `T` meets the requirements of @b `ConstBufferSequence`.
29template<class T>
30#if BEAST_DOXYGEN
31struct is_ConstBufferSequence : std::integral_constant<bool, ...>
32#else
33struct 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`.
40template<class T>
41#if BEAST_DOXYGEN
42struct is_DynamicBuffer : std::integral_constant<bool, ...>
43#else
44struct is_DynamicBuffer : detail::is_DynamicBuffer<T>::type
45#endif
46{
47};
48
49/// Determine if `T` meets the requirements of @b `MutableBufferSequence`.
50template<class T>
51#if BEAST_DOXYGEN
52struct is_MutableBufferSequence : std::integral_constant<bool, ...>
53#else
54struct is_MutableBufferSequence :
55 is_BufferSequence<T, boost::asio::mutable_buffer>
56#endif
57{
58};
59
60} // beast
61
62#endif