|
|
|
Specifies that an instance of the type can be copy-assigned from anlvalue expression.
The typeT
satisfiesCopyAssignable if
T
satisfiesMoveAssignable, andGiven
t
, a modifiablelvalue expression of typeT
,v
, anlvalue expression of typeT
orconst T
or anrvalue expression of typeconst T
.The following expressions must be valid and have their specified effects.
Expression | Return type | Return value | Post-conditions |
---|---|---|---|
t= v | T& | t | The value oft is equivalent to the value ofv .The value of |
(C++11)(C++11)(C++11) | checks if a type has a copy assignment operator (class template)[edit] |
(C++20) | specifies that a type is assignable from another type (concept)[edit] |