File indexing completed on 2025-01-18 09:29:27
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef BOOST_BEAST_IMPL_STATIC_BUFFER_HPP
0011 #define BOOST_BEAST_IMPL_STATIC_BUFFER_HPP
0012
0013 #include <boost/asio/buffer.hpp>
0014 #include <stdexcept>
0015
0016 namespace boost {
0017 namespace beast {
0018
0019 template<std::size_t N>
0020 static_buffer<N>::
0021 static_buffer(static_buffer const& other) noexcept
0022 : static_buffer_base(buf_, N)
0023 {
0024 this->commit(net::buffer_copy(
0025 this->prepare(other.size()), other.data()));
0026 }
0027
0028 template<std::size_t N>
0029 auto
0030 static_buffer<N>::
0031 operator=(static_buffer const& other) noexcept ->
0032 static_buffer<N>&
0033 {
0034 if(this == &other)
0035 return *this;
0036 this->consume(this->size());
0037 this->commit(net::buffer_copy(
0038 this->prepare(other.size()), other.data()));
0039 return *this;
0040 }
0041
0042 }
0043 }
0044
0045 #endif