]> git.proxmox.com Git - ceph.git/blame - ceph/src/Beast/include/beast/core/stream_concepts.hpp
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / Beast / include / beast / core / stream_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_STREAM_CONCEPTS_HPP
9#define BEAST_STREAM_CONCEPTS_HPP
10
11#include <beast/config.hpp>
12#include <beast/core/detail/stream_concepts.hpp>
13#include <type_traits>
14
15namespace beast {
16
17/// Determine if `T` has the `get_io_service` member.
18template<class T>
19#if BEAST_DOXYGEN
20struct has_get_io_service : std::integral_constant<bool, ...>{};
21#else
22using has_get_io_service = typename detail::has_get_io_service<T>::type;
23#endif
24
25/// Determine if `T` meets the requirements of @b `AsyncReadStream`.
26template<class T>
27#if BEAST_DOXYGEN
28struct is_AsyncReadStream : std::integral_constant<bool, ...>{};
29#else
30using is_AsyncReadStream = typename detail::is_AsyncReadStream<T>::type;
31#endif
32
33/// Determine if `T` meets the requirements of @b `AsyncWriteStream`.
34template<class T>
35#if BEAST_DOXYGEN
36struct is_AsyncWriteStream : std::integral_constant<bool, ...>{};
37#else
38using is_AsyncWriteStream = typename detail::is_AsyncWriteStream<T>::type;
39#endif
40
41/// Determine if `T` meets the requirements of @b `SyncReadStream`.
42template<class T>
43#if BEAST_DOXYGEN
44struct is_SyncReadStream : std::integral_constant<bool, ...>{};
45#else
46using is_SyncReadStream = typename detail::is_SyncReadStream<T>::type;
47#endif
48
49/// Determine if `T` meets the requirements of @b `SyncWriterStream`.
50template<class T>
51#if BEAST_DOXYGEN
52struct is_SyncWriteStream : std::integral_constant<bool, ...>{};
53#else
54using is_SyncWriteStream = typename detail::is_SyncWriteStream<T>::type;
55#endif
56
57/// Determine if `T` meets the requirements of @b `AsyncStream`.
58template<class T>
59#if BEAST_DOXYGEN
60struct is_AsyncStream : std::integral_constant<bool, ...>{};
61#else
62using is_AsyncStream = std::integral_constant<bool,
63 is_AsyncReadStream<T>::value && is_AsyncWriteStream<T>::value>;
64#endif
65
66/// Determine if `T` meets the requirements of @b `SyncStream`.
67template<class T>
68#if BEAST_DOXYGEN
69struct is_SyncStream : std::integral_constant<bool, ...>{};
70#else
71using is_SyncStream = std::integral_constant<bool,
72 is_SyncReadStream<T>::value && is_SyncWriteStream<T>::value>;
73#endif
74
75} // beast
76
77#endif