Function Subspace :: sus :: mem :: take_copy_and_destruct

template <class T>
auto take_copy_and_destruct(UnsafeFnMarker, const T& t) -> T
requires
sus::mem::Copy<T>

Copies from t and destroys the object at t. Returns the old value of t.

Safety This does not re-construct the object pointed to by t. It must not be used (or destructed again) afterward.