Книга: Standard Template Library Programmer
Default Constructible
Разделы на этой странице:
Default Constructible
Category: utilities
Component type: concept
Description
A type is DefaultConstructible if it has a default constructor, that is, if it is possible to construct an object of that type without initializing the object to any particular value.
Notation
X
A type that is a model of DefaultConstructible
x
An object of type X
Valid expressions
Name | Expression | Return type |
---|---|---|
Default constructor | X() |
X |
Default constructor | X x; [1] |
Expression semantics
Name | Expression |
---|---|
Default constructor | X() |
Default constructor | X x; |
Models
• int
• vector<double>
Notes
[1] The form X x = X() is not guaranteed to be a valid expression, because it uses a copy constructor. A type that is DefaultConstructible is not necessarily Assignable
See also
Assignable
Оглавление статьи/книги
Похожие страницы
- Setting up default policies
- Default connections
- Booting into the Default Runlevel
- Booting to a Nondefault Runlevel with GRUB
- mode and default
- Setting document defaults
- Using the default Keyword in Generics
- Метод SetDefaultPrinter
- Параметр сокета SCTP_DEFAULT_SEND_PARAM
- Customizing Default Tests
- Load Fail-Safe Defaults
- Методы Single, SingleOrDefault