Skip to content

Commit 8d85163

Browse files
committed
Removed deprecated-copy warning.
Add implementation to various BOOST_DEFAULTED_FUNCTION.
1 parent 65fc893 commit 8d85163

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

include/boost/iostreams/detail/adapter/concept_adapter.hpp

+1
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ class concept_adapter {
6666
{ BOOST_STATIC_ASSERT(is_std_io<T>::value); }
6767
explicit concept_adapter(const T& t) : t_(t)
6868
{ BOOST_STATIC_ASSERT(!is_std_io<T>::value); }
69+
BOOST_DEFAULTED_FUNCTION(concept_adapter(const concept_adapter& rhs), : t_(rhs.t_) { BOOST_STATIC_ASSERT(!is_std_io<T>::value); });
6970

7071
T& operator*() { return t_; }
7172
T* operator->() { return &t_; }

include/boost/iostreams/detail/functional.hpp

+8
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ class device_close_operation {
3636
device_close_operation(T& t, BOOST_IOS::openmode which)
3737
: t_(t), which_(which)
3838
{ }
39+
BOOST_DEFAULTED_FUNCTION(device_close_operation(const device_close_operation& rhs), : t_(rhs.t_), which_(rhs.which_) {});
3940
void operator()() const { boost::iostreams::close(t_, which_); }
4041
private:
4142
BOOST_DELETED_FUNCTION(device_close_operation& operator=(const device_close_operation&))
@@ -50,6 +51,7 @@ class filter_close_operation {
5051
filter_close_operation(T& t, Sink& snk, BOOST_IOS::openmode which)
5152
: t_(t), snk_(snk), which_(which)
5253
{ }
54+
BOOST_DEFAULTED_FUNCTION(filter_close_operation(const filter_close_operation& rhs), : t_(rhs.t_), snk_(rhs.snk_), which_(rhs.which_) {});
5355
void operator()() const { boost::iostreams::close(t_, snk_, which_); }
5456
private:
5557
BOOST_DELETED_FUNCTION(filter_close_operation& operator=(const filter_close_operation&))
@@ -76,6 +78,7 @@ class device_close_all_operation {
7678
public:
7779
typedef void result_type;
7880
device_close_all_operation(T& t) : t_(t) { }
81+
BOOST_DEFAULTED_FUNCTION(device_close_all_operation(const device_close_all_operation& rhs), : t_(rhs.t_) {});
7982
void operator()() const { detail::close_all(t_); }
8083
private:
8184
BOOST_DELETED_FUNCTION(device_close_all_operation& operator=(const device_close_all_operation&))
@@ -87,6 +90,7 @@ class filter_close_all_operation {
8790
public:
8891
typedef void result_type;
8992
filter_close_all_operation(T& t, Sink& snk) : t_(t), snk_(snk) { }
93+
BOOST_DEFAULTED_FUNCTION(filter_close_all_operation(const filter_close_all_operation& rhs), : t_(rhs.t_), snk_(rhs.snk_) {});
9094
void operator()() const { detail::close_all(t_, snk_); }
9195
private:
9296
BOOST_DELETED_FUNCTION(filter_close_all_operation& operator=(const filter_close_all_operation&))
@@ -113,6 +117,7 @@ class member_close_operation {
113117
member_close_operation(T& t, BOOST_IOS::openmode which)
114118
: t_(t), which_(which)
115119
{ }
120+
BOOST_DEFAULTED_FUNCTION(member_close_operation(const member_close_operation& rhs), : t_(rhs.t_), which_(rhs.which_) {});
116121
void operator()() const { t_.close(which_); }
117122
private:
118123
BOOST_DELETED_FUNCTION(member_close_operation& operator=(const member_close_operation&))
@@ -131,6 +136,7 @@ template<typename T>
131136
class reset_operation {
132137
public:
133138
reset_operation(T& t) : t_(t) { }
139+
BOOST_DEFAULTED_FUNCTION(reset_operation(const reset_operation& rhs), : t_(rhs.t_) {});
134140
void operator()() const { t_.reset(); }
135141
private:
136142
BOOST_DELETED_FUNCTION(reset_operation& operator=(const reset_operation&))
@@ -147,6 +153,7 @@ class clear_flags_operation {
147153
public:
148154
typedef void result_type;
149155
clear_flags_operation(T& t) : t_(t) { }
156+
BOOST_DEFAULTED_FUNCTION(clear_flags_operation(const clear_flags_operation& rhs), : t_(rhs.t_) {});
150157
void operator()() const { t_ = 0; }
151158
private:
152159
BOOST_DELETED_FUNCTION(clear_flags_operation& operator=(const clear_flags_operation&))
@@ -167,6 +174,7 @@ class flush_buffer_operation {
167174
flush_buffer_operation(Buffer& buf, Device& dev, bool flush)
168175
: buf_(buf), dev_(dev), flush_(flush)
169176
{ }
177+
BOOST_DEFAULTED_FUNCTION(flush_buffer_operation(const flush_buffer_operation& rhs), : buf_(rhs.buf_), dev_(rhs.dev_), flush_(rhs.flush_) {});
170178
void operator()() const
171179
{
172180
if (flush_)

0 commit comments

Comments
 (0)