ゴミ箱
buffers_ref.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_DETAIL_BUFFERS_REF_HPP
11 #define BOOST_BEAST_DETAIL_BUFFERS_REF_HPP
12 
14 
15 namespace boost {
16 namespace beast {
17 namespace detail {
18 
19 // A very lightweight reference to a buffer sequence
20 template<class BufferSequence>
22 {
23  BufferSequence const* buffers_;
24 
25 public:
26  using value_type =
28 
29  using const_iterator =
31 
32  buffers_ref(buffers_ref const&) = default;
33  buffers_ref& operator=(buffers_ref const&) = default;
34 
35  explicit
37  : buffers_(std::addressof(buffers))
38  {
39  }
40 
42  begin() const
43  {
44  return buffers_->begin();
45  }
46 
48  end() const
49  {
50  return buffers_->end();
51  }
52 };
53 
54 // Return a reference to a buffer sequence
55 template<class BufferSequence>
58 {
60 }
61 
62 } // detail
63 } // beast
64 } // boost
65 
66 #endif
Definition: async_result.hpp:20
Definition: buffers_ref.hpp:21
const_iterator begin() const
Definition: buffers_ref.hpp:42
buffers_ref(BufferSequence const &buffers)
Definition: buffers_ref.hpp:36
detail::buffers_helper< ConstBufferSequence > buffers(ConstBufferSequence const &b)
Definition: ostream.hpp:50
typename BufferSequence::const_iterator const_iterator
Definition: buffers_ref.hpp:30
STL namespace.
buffers_ref & operator=(buffers_ref const &)=default
BufferType value_type
Definition: type_traits.hpp:272
typename BufferSequence::value_type value_type
Definition: buffers_ref.hpp:27
BufferType const * const_iterator
Definition: type_traits.hpp:273
Definition: type_traits.hpp:270
buffers_ref(buffers_ref const &)=default
const_iterator end() const
Definition: buffers_ref.hpp:48
const_iterator begin() const noexcept
buffers_ref< BufferSequence > make_buffers_ref(BufferSequence const &buffers)
Definition: buffers_ref.hpp:57
const_iterator end() const noexcept