C++ named requirements: CopyAssignable
From cppreference.com
C++
Feature test macros (C++20)
Concepts library (C++20)
Metaprogramming library (C++11)
Ranges library (C++20)
Filesystem library (C++17)
Concurrency support library (C++11)
Execution control library (C++26)
C++ named requirements
(C++11)
CopyAssignable
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++17)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++17)
(C++20)
(C++20)
(C++20)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++14)
(C++14)
(C++11)
(C++11)
(C++17)
(C++14)
(C++20)
(C++20)
(C++23)
(C++23)
(C++23)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
Specifies that an instance of the type can be copy-assigned from an lvalue expression.
[edit] Requirements
The type T
satisfies CopyAssignable if
- The type
T
satisfies MoveAssignable, and
Given
-
t
, a modifiable lvalue expression of typeT
, -
v
, an lvalue expression of typeT
orconst T
or an rvalue 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 of t is equivalent to the value of v .
The value of |