I'm trying to do the following:
std::vector< std::fstream > filelist;
while( condition ) {
fstream f( filename );
// Do some stuff with f
f.seekg( 0, std::ios_base::beg );
filelist.push_back( std::move( f ) );
}
However, this is going ka-boom when I try to compile it. I know that streams are not supposed to be copy-able in C++11, but they should be move-able, right? I'm feeling like there's something I'm missing here.
Oh, and I am using g++ 4.8.1 with the --std=c++11 option