+Previous versions of the compiler allowed implicit definition of default copy and move constructors and default copy and move assignment operators in classes that have `volatile` member variables. This behavior does not conform to the C++ standard. The compiler now considers a class that has volatile member variables to have non-trivial construction and assignment operators, which prevents automatic generation of default implementations of these operators. When such a class is a member of a union, or an anonymous union inside of a class, the copy and move constructors and copy and move assignment operators of the union, or the class containing the unonymous union, are implicitly defined as deleted. An attempt to construct or copy such a union or class without explicitly defining these operators causes compiler error C2280.
0 commit comments