mrdocs::Polymorphic::Polymorphic
Constructors
Synopses
Declared in <mrdocs/ADT/Polymorphic.hpp>
Copy constructor
constexpr
Polymorphic(Polymorphic const& V);
Move constructor
constexpr
Polymorphic(Polymorphic&& V) noexcept;
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>;
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>;
Parameters
| Name | Description |
|---|---|
ts |
Arguments to forward to U's constructor. |
Created with MrDocs