35 template<
typename SmartPo
inter,
typename T>
37 std::same_as<SmartPointer, std::shared_ptr<T>> ||
38 std::same_as<SmartPointer, std::unique_ptr<T>>;
46 template<
class T,
typename SmartPo
inter = std::shared_ptr<T>>
58 template<
class Target,
typename... Args>
89 virtual constexpr ~
Clonable() noexcept = default;
105#include <StormByte/clonable.txx>
Polymorphic clone/move into a smart pointer of type T.
Definition clonable.hxx:47
static PointerType MakePointer(Args &&... args)
Allocates Target and returns it as PointerType.
constexpr Clonable(const Clonable &)=default
Copy constructor.
virtual PointerType Clone() const =0
Deep copy into a new PointerType.
virtual PointerType Move()=0
Moves this object into a new PointerType.
constexpr Clonable()=default
Default constructor.
constexpr Clonable(Clonable &&) noexcept=default
Move constructor.
SmartPointer PointerType
SmartPointer alias.
Definition clonable.hxx:49
true when SmartPointer is shared_ptr<T> or unique_ptr<T>.
Definition clonable.hxx:36
Root namespace of the StormByte suite.