Function Subspace :: sus :: mem :: clone_into

template <class T>
auto clone_into(T& dest, const T& source) -> void
requires
sus::mem::Clone<T>

Performs copy-assignment from source.

Will perform a copy assignment if T is Copy. Otherwise will perform the equivalent of dest = source.clone().

The Clone type may provide an implementation of clone_from(const T& source) to reuse its resources and avoid unnecessary allocations, which will be preferred over calling source.clone().