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

@ -37,6 +37,9 @@ protected:
NonCopyable() {}
NonCopyable(const NonCopyable&&) {}
void operator=(const NonCopyable&&) {}
private:
NonCopyable(NonCopyable&);
NonCopyable& operator=(NonCopyable& other);
};
#endif