Constructors
Declared in <mrdocs/ADT/Polymorphic.hpp>
Copy constructor.
constexpr
Polymorphic(Polymorphic const& V);
» more...
Move constructor.
constexpr
Polymorphic(Polymorphic&& V) noexcept;
» more...
Forwarding constructor from a derived U.
template<class U>
constexpr
explicit
Polymorphic(U&& u)
requires (!std::same_as<Polymorphic, std::remove_cvref_t<U>>) &&
std::copy_constructible<std::remove_cvref_t<U>> &&
std::derived_from<std::remove_cvref_t<U>, T>;
» more...
In-place constructor for a specific derived U.
template<
class U,
class... Ts>
constexpr
explicit
Polymorphic(
std::in_place_type_t<U>,
Ts&&... ts)
requires std::same_as<std::remove_cvref_t<U>, U> &&
std::constructible_from<U, Ts&&...> &&
std::copy_constructible<U> && std::derived_from<U, T>;
» more...
| Name | Description |
|---|---|
| V | Source object. |
| ts | Arguments to forward to U's constructor. |