Difference between revisions of "cpp/named req/CopyAssignable"
From cppreference.com
m (Text replace - "/sidebar" to "/navbar") |
m (r2.7.3) (Robot: Adding de, es, fr, it, ja, pt, ru, zh) |
||
Line 33: | Line 33: | ||
{{dcl list template | cpp/types/dcl list is_copy_assignable}} | {{dcl list template | cpp/types/dcl list is_copy_assignable}} | ||
{{dcl list end}} | {{dcl list end}} | ||
+ | |||
+ | [[de:cpp/concept/CopyAssignable]] | ||
+ | [[es:cpp/concept/CopyAssignable]] | ||
+ | [[fr:cpp/concept/CopyAssignable]] | ||
+ | [[it:cpp/concept/CopyAssignable]] | ||
+ | [[ja:cpp/concept/CopyAssignable]] | ||
+ | [[pt:cpp/concept/CopyAssignable]] | ||
+ | [[ru:cpp/concept/CopyAssignable]] | ||
+ | [[zh:cpp/concept/CopyAssignable]] |
Revision as of 14:25, 2 November 2012
Template:cpp/concept/title Template:cpp/concept/navbar
Specifies that an instance of the type can be copy-assigned (copied).
This concept implies Template:concept.
Requirements
The type must implement the following functions:
Type::operator=
Type& Type::operator=( Type& other ); Type& Type::operator=( const Type& other ); |
(One of the variants is sufficient) | |
Copy assignment operator: assigns the contents of other
. The internal state of other
must not be modified.
The following expressions must have the specified effects:
Expression | Effects |
a = v; | a is equivalent to v , where a is an instance of Type and v is an instance of Type . v must be unchanged.
|
See also
(C++11)(C++11)(C++11) |
checks if a type has a copy assignment operator (class template) |