cpp/memory/inout ptr t/~inout ptr t

Resets the adapted object by the value of modified  object (or the  object if  has been called) and the captured arguments. may be called on the adapted object if it is not called by the constructor.

Let
 * denotes the adapted object,
 * denotes the captured arguments,
 * denotes the value of stored, or if  has been called,
 * be
 * , if it is valid and denotes a type, otherwise,
 * , if is valid and denotes a type, otherwise,
 * , if is valid and denotes a type, otherwise,
 * denotes if the  does not call, empty otherwise.
 * denotes if the  does not call, empty otherwise.

If is a pointer type, the destructor performs
 * , and the program is ill-formed if ,

otherwise, if is well-formed, the destructor performs

otherwise, if is, the destructor performs

otherwise, the program is ill-formed.