A default constructor
that is defaulted and not defined as deleted
is
implicitly defined
when it is odr-used (
[basic.def.odr])
to create an object of its class type (
[intro.object]),
when it is needed for constant evaluation (
[expr.const]), or
when it is explicitly defaulted after its first declaration
. If that user-written default constructor would be ill-formed,
the program is ill-formed
. If that user-written default constructor would satisfy the requirements
of a constexpr constructor (
[dcl.constexpr]), the implicitly-defined
default constructor is
constexpr. Before the defaulted default constructor for a class is
implicitly defined,
all the non-user-provided default constructors for its base classes and
its non-static data members are implicitly defined
. [
Note 1:
An implicitly-declared default constructor has an
exception specification (
[except.spec])
. An explicitly-defaulted definition might have an
implicit exception specification, see
[dcl.fct.def]. —
end note]