Concept Subspace :: sus :: mem :: CopyOrRef

template <class T>
concept CopyOrRef
requires
Copy<T> || std::is_reference_v<T>

A CopyOrRef object or reference of type T can be copied to construct a new T.

Satisfying CopyOrRef also implies that the type satisfies CloneOrRef.

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 Copy.