ゴミ箱
buffer_cat.hpp
Go to the documentation of this file.
1 //
2 // Copyright (c) 2016-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 // Official repository: https://github.com/boostorg/beast
8 //
9 
10 #ifndef BOOST_BEAST_BUFFER_CAT_HPP
11 #define BOOST_BEAST_BUFFER_CAT_HPP
12 
13 #include <boost/beast/config.hpp>
15 #include <tuple>
16 
17 namespace boost {
18 namespace beast {
19 
24 template<class... Buffers>
26 {
27  std::tuple<Buffers...> bn_;
28 
29 public:
36 #if BOOST_BEAST_DOXYGEN
37  using value_type = implementation_defined;
38 #else
39  using value_type = typename
40  detail::common_buffers_type<Buffers...>::type;
41 #endif
42 
44  class const_iterator;
45 
47  buffer_cat_view(buffer_cat_view&&) = default;
48 
51 
53  buffer_cat_view& operator=(buffer_cat_view const&) = default;
54 
61  explicit
62  buffer_cat_view(Buffers const&... buffers);
63 
64  //-----
65 
67  buffer_cat_view(buffer_cat_view const&) = default;
68 
70  const_iterator
71  begin() const;
72 
74  const_iterator
75  end() const;
76 };
77 
97 #if BOOST_BEAST_DOXYGEN
98 template<class... BufferSequence>
99 buffer_cat_view<BufferSequence...>
100 buffer_cat(BufferSequence const&... buffers)
101 #else
102 template<class B1, class B2, class... Bn>
103 inline
104 buffer_cat_view<B1, B2, Bn...>
105 buffer_cat(B1 const& b1, B2 const& b2, Bn const&... bn)
106 #endif
107 {
108  static_assert(
110  "BufferSequence requirements not met");
111  return buffer_cat_view<B1, B2, Bn...>{b1, b2, bn...};
112 }
113 
114 } // beast
115 } // boost
116 
118 
119 #endif
Definition: async_result.hpp:20
Definition: type_traits.hpp:339
detail::buffers_helper< ConstBufferSequence > buffers(ConstBufferSequence const &b)
Definition: ostream.hpp:50
buffer_cat_view & operator=(buffer_cat_view &&)=default
Assignment.
typename detail::common_buffers_type< Buffers... >::type value_type
Definition: buffer_cat.hpp:40
const_iterator end() const
Required for BufferSequence.
Definition: buffer_cat.ipp:486
const_iterator begin() const
Required for BufferSequence.
Definition: buffer_cat.ipp:477
Definition: buffer_cat.hpp:25
buffer_cat_view< B1, B2, Bn... > buffer_cat(B1 const &b1, B2 const &b2, Bn const &...bn)
Definition: buffer_cat.hpp:105
buffer_cat_view(buffer_cat_view &&)=default
Constructor.