Concept Subspace :: sus :: mem :: CloneOrRef

template <class T>
concept CloneOrRef
requires
Clone<T> || std::is_reference_v<T>

A CloneOrRef object or reference of type T can be cloned to construct a new T.

This concept is used for templates that want to be generic over references, that is templates that want to allow their template parameter to be a reference and work with that reference as if it were an object itself. This is uncommon outside of library implementations, and its usage should typically be encapsulated inside a type that is Clone.