StormByte C++ Library 1.2.0
StormByte is a comprehensive, cross-platform C++ library aimed at easing system programming, configuration management, logging, and database handling tasks. This library provides a unified API that abstracts away the complexities and inconsistencies of different platforms (Windows, Linux).
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:136

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 Container and not a 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.