beman::optional::optional::optional

Copy constructs the value from rhs if it has one.

Synopsis

Declared in <beman/optional/optional.hpp>

constexpr
optional(optional const& rhs)
requires std::is_copy_constructible_v<T> && std::is_trivially_copy_constructible_v<T> = default;

Description

Defaulted if T is trivially copy constructible.

Parameters

NameDescription
rhsThe optional to copy from.