C++ named requirements: DefaultConstructible

Specifies that an instance of the type can be default constructed.

# Notes

For objects of non-aggregate class type, a public default constructor must be defined (either user-defined or implicitly defined) to satisfy DefaultConstructible.

Non-const objects of non-class object type are always DefaultConstructible.

Const non-class types are not DefaultConstructible.

Const aggregate types are not DefaultConstructible if any of their members is an object of non-class type.

Non-object types (function types, reference types, and the (possibly cv-qualified) type void) as well as the const non-object types are never DefaultConstructible.

# Defect reports

DRApplied toBehavior as publishedCorrect behavior
LWG 724C++98the requirements of DefaultConstructible were missingadded
LWG 2170C++98initialzing an object of a DefaultConstructible type with anempty initializer could only result in value-initializationcan also lead toaggregate-initialization

# See also