Re: [Boost-bugs] [Boost C++ Libraries] #9211: fstream types don't have move semantics

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #9211: fstream types don't have move semantics
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-03-24 09:36:46


#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):

 Here is a use case:

 {{{
 template <typename Stream, typename... Args>
 Stream StreamOpen(Args&&... args) {
         Stream stream;
         stream.exceptions(ios::failbit | ios::badbit);
         stream.open(forward<Args>(args)...);
         return stream;
 }
 }}}
 {{{
 auto f1 = StreamOpen<std::ifstream>("filename", std::ios::binary); //
 succeeds
 auto f2 = StreamOpen<boost::filesystem::ifstream>("filename",
 std::ios::binary); // fails
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/9211#comment:3>
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:15 UTC