Default constructors

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.

Syntax

ClassName ( ) ; (1)
ClassName :: ClassName ( ) body (2)
ClassName() = delete ; (3) 登录查看完整内容