Skip to content

Default constructors

cppreference Default constructors

A default constructor is a constructor which can be called with no arguments (either defined with an empty parameter list, or with default arguments provided for every parameter). A type with a public default constructor is DefaultConstructible.

NOTE: 在维基百科C++11#Modification to the definition of plain old data 中提及了**statically initialized**,这让我想起了这样的问题:

DefaultConstructible能够被 statically initialized

Syntax

Implicitly-declared default constructor

Implicitly-defined default constructor

Deleted implicitly-declared default constructor

Trivial default constructor

Eligible default constructor