This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/57677] New: Fstream should be allowed to move when returned from a function
- From: "mikhail_semenov at hotmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 22 Jun 2013 18:59:40 +0000
- Subject: [Bug c++/57677] New: Fstream should be allowed to move when returned from a function
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57677
Bug ID: 57677
Summary: Fstream should be allowed to move when returned from a
function
Product: gcc
Version: 4.8.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: mikhail_semenov at hotmail dot com
Created attachment 30339
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30339&action=edit
The program should compile and run for the ifstream.txt described above
Similar to the bug 53626 (reported before for version 4.7.0) for C++11.
The fstream should be able to open and be returned from a function: move should
be allowed to be used in this case. The program should run with the following
file contents (ifstream.txt):
My File
Some types are not amenable to copy semantics but can still be made movable.
For example:
(1) fstream
(2) unique_ptr (non-shared, non-copyable ownership)
(3) A type representing a thread of execution