deductionguidesforstd::optional (3) - Linux Manuals
deductionguidesforstd::optional: deductionguidesforstd::optional
NAME
deductionguidesforstd::optional - deductionguidesforstd::optional
Synopsis
Defined in header <optional>
template<class T> (since C++17)
optional(T) -> optional<T>;
One deduction_guide is provided for std::optional to account for the edge cases missed by the implicit deduction guides, in particular, non-copyable arguments and array to pointer conversion
Example
// Run this code