C ++ 0x allows you to specify specific functions by default:
struct A { A() = default;
The implementation of these functions is the same as if the compiler generated them, which usually happens in most cases when you do not declare your own.
By default, ctor is not generated if you declare any ctor (any of the above), so you may need to return it by default.
However, if a database or data element does not exclude them, the class always has a copy and moves ctorβ -β , and if they are excluded, the default implementation will not work. A class always has a dtor.
Why do you need to explicitly specify a copy of ctor, move ctor or destructor? One way or another, will they not implicitly generated implementations do the same?
c ++ c ++ 11
Roger Pate
source share