StormByte 2.0.0
C++26 foundation of the StormByte suite
 
Loading...
Searching...
No Matches
StormByte::Type::CopyConstructible Concept Reference

Type that can actually be copy-constructed. More...

#include <StormByte/type_traits/object_semantics.hxx>

Concept definition

template<typename T>
concept StormByte::Type::CopyConstructible = ReallyCopyConstructible<T>
Type that can actually be copy-constructed.
Definition object_semantics.hxx:188

Detailed Description

Type that can actually be copy-constructed.

Template Parameters
TType to test.

Not std::is_copy_constructible_v: that trait is true for std::vector<std::unique_ptr<U>> because vector declares a copy constructor even when instantiating it is ill-formed. Recurses into value_type only when T is a StormByte::Type::Container and not a StormByte::Type::View. std::span<std::unique_ptr<U>> is a container and a view, so it stays copyable; an owning std::vector<std::unique_ptr<U>> does not.