std::map<std::string, std::ofstream> Map;
std::string name="name";
std::ofstream ofs(name,std::ios::app);
Map[name] = std::move(ofs);
を削除ofstreamの。 -std = C++ 11を使用して、Ubuntu12.04およびg ++ - 5(gccバージョン5.4.1 20160904(Ubuntu 5.4.1-2ubuntu1〜12.04))のg ++ 4.9でコンパイルしました。エラー:削除された機能の使用「のstd :: basic_ofstream <char>&はstd :: basic_ofstream <char> ::演算子=(定数のstd :: basic_ofstream <char>&)」私は上記のコードを実行しますが、それは失敗し
error: use of deleted function ‘std::basic_ofstream& std::basic_ofstream::operator=(const std::basic_ofstream&)’ Map[name] = std::move(ofs);
/usr/include/c++/4.9/fstream:602:11: note: ‘std::basic_ofstream& std::basic_ofstream::operator=(const std::basic_ofstream&)’ is implicitly deleted because the default definition would be ill-formed: class basic_ofstream : public basic_ostream<_CharT,_Traits>
g ++バージョン固有のように見えます。 VS 2013と[g ++ - 5.1](http://coliru.stacked-crooked.com/a/c83e8a3939ac3115)でビルドしますか? – acraig5075