[class.copy] / 12 in C ++ 14:
The copy / move constructor for class X is trivial if it is not provided to users, its list of parameter parameters is equivalent to the list of parameter type of an implicit declaration , and if
- (12.1) - class X has no virtual functions (10.3) and there is no virtual base classes (10.1) and
- (12.2) - class X does not contain non-static data of an unstable type and
- (12.3) - the constructor selected for copying / moving each direct base the subobject class is trivial, and
- (12.4) - for each non-static data element X that has a class type (or array), the constructor selected for copying / moving this member is trivial;
otherwise, the copy / move constructor is not trivial.
I see that the above sentence was erased in N4606, but I could not find anything in C ++ Standard Core Language Active Issues, version 96 , to justify its removal from C ++ 14.
source share