Line data Source code
1 : //
2 : // Copyright (c) 2025 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/cppalliance/beast2
8 : //
9 :
10 : #include <boost/beast2/server/body_source.hpp>
11 :
12 : namespace boost {
13 : namespace beast2 {
14 :
15 9 : body_source::
16 5 : ~body_source()
17 : {
18 9 : if(! impl_)
19 4 : return;
20 5 : impl_->~impl();
21 5 : ::operator delete(impl_);
22 9 : }
23 :
24 : body_source&
25 3 : body_source::
26 : operator=(body_source&& other) noexcept
27 : {
28 3 : if(&other == this)
29 0 : return *this;
30 3 : if(impl_)
31 : {
32 1 : impl_->~impl();
33 1 : ::operator delete(impl_);
34 : }
35 3 : impl_ = other.impl_;
36 3 : other.impl_ = nullptr;
37 3 : return *this;
38 : }
39 :
40 : } // beast2
41 : } // boost
|