diff --git a/source/support.tex b/source/support.tex index 70028e6719..e0713a0e32 100644 --- a/source/support.tex +++ b/source/support.tex @@ -674,7 +674,7 @@ #define @\defnlibxname{cpp_lib_exception_ptr_cast}@ 202603L // also in \libheader{exception} #define @\defnlibxname{cpp_lib_exchange_function}@ 201304L // freestanding, also in \libheader{utility} #define @\defnlibxname{cpp_lib_execution}@ 201902L // also in \libheader{execution} -#define @\defnlibxname{cpp_lib_expected}@ 202211L // also in \libheader{expected} +#define @\defnlibxname{cpp_lib_expected}@ 202606L // also in \libheader{expected} #define @\defnlibxname{cpp_lib_filesystem}@ 201703L // also in \libheader{filesystem} #define @\defnlibxname{cpp_lib_flat_map}@ 202511L // also in \libheader{flat_map} #define @\defnlibxname{cpp_lib_flat_set}@ 202511L // also in \libheader{flat_set} diff --git a/source/utilities.tex b/source/utilities.tex index f3e66eb429..228cca1241 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -8524,6 +8524,7 @@ constexpr T&& operator*() && noexcept; constexpr explicit operator bool() const noexcept; constexpr bool has_value() const noexcept; + constexpr bool has_error() const noexcept; constexpr const T& value() const &; // freestanding-deleted constexpr T& value() &; // freestanding-deleted constexpr const T&& value() const &&; // freestanding-deleted @@ -9417,6 +9418,20 @@ \exposid{has_val}. \end{itemdescr} +\indexlibrarymember{has_error}{expected}% +\begin{itemdecl} +constexpr bool has_error() const noexcept; +\end{itemdecl} + +\begin{itemdescr} +\pnum +\effects +Equivalent to: +\begin{codeblock} +return !has_value(); +\end{codeblock} +\end{itemdescr} + \indexlibrarymember{value}{expected}% \begin{itemdecl} constexpr const T& value() const &; @@ -9943,6 +9958,7 @@ // \ref{expected.void.obs}, observers constexpr explicit operator bool() const noexcept; constexpr bool has_value() const noexcept; + constexpr bool has_error() const noexcept; constexpr void operator*() const noexcept; constexpr void value() const &; // freestanding-deleted constexpr void value() &&; // freestanding-deleted @@ -10445,6 +10461,20 @@ \exposid{has_val}. \end{itemdescr} +\indexlibrarymember{has_error}{expected}% +\begin{itemdecl} +constexpr bool has_error() const noexcept; +\end{itemdecl} + +\begin{itemdescr} +\pnum +\effects +Equivalent to: +\begin{codeblock} +return !has_value(); +\end{codeblock} +\end{itemdescr} + \indexlibrarymember{operator*}{expected}% \begin{itemdecl} constexpr void operator*() const noexcept;