value semantics


MoveConstructible

Suppose that We say that a type T is MoveConstructible when the following is true:
Expression Post-conditions
T u = rv; The value of u is equivalent to the value of rv before the initialization.
T(rv) The value of T(rv) is equivalent to the value of rv before the initialization.

Note that there is no condition on the value of rv after these operations

CopyAssignable

Suppose that: We say that a type T is CopyAssignable when the following is true:
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 v is unchanged.

CopyConstructible

Suppose that: We say that a type T is CopyConstructible when the following is true:
Expression Post-conditions
T u = v; The value of u is equivalent to the value of v.

The value of v is unchanged.
T(v) The value of T(v) is equivalent to the value of v.

The value of v is unchanged.

Additionally, the xpression v.~T() must be valid, and for lvalue v, the expression &v must have type T* or const T* and evaluate to the address of v.

We say that a type T is MoveAssignable when the following is true:
Expression Return type Return value Post-conditions
t = rv T& t If t and rv do not refer to the same object, the value of t is equivalent to the value of rv before the assignment.

The new value of rv is unspecified.
We say that a type T is DefaultConstructible when the following is true:
Expression Post-condition
T t; object t is default-initialized
T u{}; object u is value-initialized or aggregate-initialized
T()
T{}
an object of type T is value-initialized or aggregate-initialized