Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:29:26

0001 //
0002 // Copyright (c) 2016-2019 Vinnie Falco (vinnie dot falco at gmail dot com)
0003 //
0004 // Distributed under the Boost Software License, Version 1.0. (See accompanying
0005 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0006 //
0007 // Official repository: https://github.com/boostorg/beast
0008 //
0009 
0010 #ifndef BOOST_BEAST_IMPL_FLAT_STATIC_BUFFER_HPP
0011 #define BOOST_BEAST_IMPL_FLAT_STATIC_BUFFER_HPP
0012 
0013 namespace boost {
0014 namespace beast {
0015 
0016 template<std::size_t N>
0017 flat_static_buffer<N>::
0018 flat_static_buffer(
0019     flat_static_buffer const& other)
0020     : flat_static_buffer_base(buf_, N)
0021 {
0022     this->commit(net::buffer_copy(
0023         this->prepare(other.size()), other.data()));
0024 }
0025 
0026 template<std::size_t N>
0027 auto
0028 flat_static_buffer<N>::
0029 operator=(flat_static_buffer const& other) ->
0030     flat_static_buffer<N>&
0031 {
0032     if(this == &other)
0033         return *this;
0034     this->consume(this->size());
0035     this->commit(net::buffer_copy(
0036         this->prepare(other.size()), other.data()));
0037     return *this;
0038 }
0039 
0040 } // beast
0041 } // boost
0042 
0043 #endif