Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix couple of -Wdeprecated-copy when using clang with std=gnu++20 or gnu++2b. #154

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions include/boost/iostreams/detail/adapter/concept_adapter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ class concept_adapter {
{ BOOST_STATIC_ASSERT(is_std_io<T>::value); }
explicit concept_adapter(const T& t) : t_(t)
{ BOOST_STATIC_ASSERT(!is_std_io<T>::value); }
concept_adapter(const concept_adapter& other) : t_(other.t_)
{ BOOST_STATIC_ASSERT(!is_std_io<T>::value); }

T& operator*() { return t_; }
T* operator->() { return &t_; }
Expand Down
4 changes: 4 additions & 0 deletions include/boost/iostreams/detail/functional.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ class member_close_operation {
member_close_operation(T& t, BOOST_IOS::openmode which)
: t_(t), which_(which)
{ }
member_close_operation(const member_close_operation& other)
: t_(other.t_), which_(other.which_)
{ }
void operator()() const { t_.close(which_); }
private:
BOOST_DELETED_FUNCTION(member_close_operation& operator=(const member_close_operation&))
Expand All @@ -131,6 +134,7 @@ template<typename T>
class reset_operation {
public:
reset_operation(T& t) : t_(t) { }
reset_operation(const reset_operation& other) : t_(other.t_) { }
void operator()() const { t_.reset(); }
private:
BOOST_DELETED_FUNCTION(reset_operation& operator=(const reset_operation&))
Expand Down