Expression Assertion/note
pre-/post-condition
T u = rv; Postconditions: u is equivalent to the value of rv before the construction
T(rv) Postconditions: T(rv) is equivalent to the value of rv before the construction
common

Postconditions:

  • rv is destructible
  • If T is required to be Cpp17MoveAssignable;
    • rv satisfies any preconditions for the lhs argument to move-assignment and,
    • rv is a fixed-point, such that following a subsequent operation, u = (T&&)(rv), where u and rv refer to the same object, the value of the object is equivalent to the value before the operation
  • If T is required to be Cpp17CopyAssignable;
    • rv satisfies any preconditions for the lhs argument to copy-assignment
  • The value of rv is otherwise unspecified
Expression Return type Return value Assertion/note
pre-/post-condition
t = rv T& t

Preconditions: t and rv do not refer to the same object, or the object value is a fixed-point (see Cpp17MoveConstructible)

Postconditions:

  • t is equivalent to the value of rv before the assignment
  • rv is destructible
  • rv satisfies any preconditions for the lhs argument to move-assignment
  • If rv is required to be Cpp17CopyAssignable;
    • rv satisfies any preconditions for the lhs argument to copy-assignment
  • The value of rv is otherwise unspecified