Opened 7 years ago
Last modified 6 years ago
#11731 new Bugs
iostreams classes do not support C++11 move semantics
Reported by: | Owned by: | Jonathan Turkanis | |
---|---|---|---|
Milestone: | To Be Determined | Component: | iostreams |
Version: | Boost Development Trunk | Severity: | Problem |
Keywords: | Cc: | ki.stfu@… |
Description
At least some iostreams classes do not support C++11 move semantics. Attempts to "move-construct" them result in compiler errors. Such classes include but are probably not limited to filtering_istream.
#include <boost/iostreams/filtering_stream.hpp>
struct Foo {
Foo(Foo&& o)
: f(std::move(o.f)) { }
boost::iostreams::filtering_istream f;
};
Change History (2)
comment:1 by , 6 years ago
comment:2 by , 6 years ago
Cc: | added |
---|---|
Version: | Boost 1.57.0 → Boost Development Trunk |
Note:
See TracTickets
for help on using tickets.
Hi!
I faced with the same problem when I tried to move
boost::iostreams::stream<>
. Here is my app:I found couple classes that prevent compiler from implicitly-declaring move constructors. These classes have user-declared copy constructor/destructor and because of this reason we have to implement move operators by ourselves.
Can anyone look into this issue?