Work around MSVC bug, and make it less likely to happen again. Ew.

MSVC insisted on using a copy assignment where a move was intended and
ought to be used.  This would have been caught, because the class in
question inherits from NonCopyable, which declares a move assignment
operator, which is supposed to delete the implicitly declared copy
assignment operator, but of course MSVC didn't do that either, causing a
class that should have been safe to be unsafe.
This commit is contained in:
comex
2013-08-31 23:44:26 -04:00
parent 5209abeb03
commit a6f6695ecd
5 changed files with 29 additions and 9 deletions

View File

@ -211,6 +211,9 @@ public:
std::FILE* m_file;
bool m_good;
private:
IOFile(IOFile&);
IOFile& operator=(IOFile& other);
};
} // namespace