Namespaces
Variants
Views
Actions

Difference between revisions of "cpp/named req/CopyConstructible"

From cppreference.com
< cpp‎ | named req
(+other variants)
Line 16: Line 16:
 
Type::Type( const volatile Type& other );
 
Type::Type( const volatile Type& other );
 
}}
 
}}
{{ddcl | Type::Type( const Type& other );}}
 
  
 
[[cpp/language/copy_constructor|Copy constructor]]: constructs an instance of a type with the contents of {{tt|other}}. The internal state of {{tt|other}} is not modified.
 
[[cpp/language/copy_constructor|Copy constructor]]: constructs an instance of a type with the contents of {{tt|other}}. The internal state of {{tt|other}} is not modified.

Revision as of 06:53, 11 March 2012

Template:cpp/concept/title Template:cpp/concept/sidebar

Specifies that an instance of the type can be copy-constructed (copied).

Requirements

The type must implement the following functions:

Type::Type

Type::Type( Type& other );

Type::Type( const Type& other );
Type::Type( volatile Type& other );

Type::Type( const volatile Type& other );
(One of the variants is sufficient)

Copy constructor: constructs an instance of a type with the contents of other. The internal state of other is not modified.

The following expressions must have the specified effects:

Template:tdcl list begin Template:tdcl list hitem Template:tdcl list item Template:tdcl list item Template:tdcl list end