Re: [Boost-bugs] [Boost C++ Libraries] #9211: fstream types don't have move semantics (was: fstream types don't have move semantics or swap method)

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #9211: fstream types don't have move semantics (was: fstream types don't have move semantics or swap method)
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-05-27 12:07:03


#9211: fstream types don't have move semantics
-------------------------------+---------------------------------
  Reporter: anonymous | Owner: bemandawes
      Type: Feature Requests | Status: new
 Milestone: To Be Determined | Component: filesystem
   Version: Boost 1.54.0 | Severity: Problem
Resolution: | Keywords: fstream rvalue move
-------------------------------+---------------------------------

Comment (by anonymous):

 Actually the boost classes don't need `swap` methods of their own, they
 can just use the ones inherited from std:
 {{{
 class myifstream : public boost::filesystem::ifstream {
         myifstream() { }
         myifstream(myifstream&& other) {
                 swap(other);
         }
         myifstream& operator=(myifstream&& other) {
                 swap(other);
                 return *this;
         }
 };
 }}}
 {{{
 auto f3 = StreamOpen<myifstream>("filename", std::ios::binary); //
 succeeds
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/9211#comment:6>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:16 UTC