Namespaces
Variants
Views
Actions

C++ concepts: DefaultConstructible

From cppreference.com
< cpp‎ | concept
Revision as of 21:49, 31 May 2013 by P12bot (Talk | contribs)

 
 
 

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

Requirements

The type must implement the following functions:

Type::Type

Type::Type();

default constructor: constructs an instance of a type with default contents.

The following expressions must have the specified effects:

Expression Effects
Type a1; a1 is default-initialized.
Type a2{}; a2 is value-initialized.
Type{}
Type()
a temporary object of type Type is value-initialized.

See also

checks if a type has a default constructor
(class template) [edit]