From b9a6c7bc8440a465e974b462509ec47968520c4a Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Wed, 21 Jun 2023 10:43:20 +0100 Subject: [PATCH] P2497R0 Testing for success or failure of functions --- source/support.tex | 2 +- source/utilities.tex | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/source/support.tex b/source/support.tex index 60320199c9..6ff283cefb 100644 --- a/source/support.tex +++ b/source/support.tex @@ -735,7 +735,7 @@ #define @\defnlibxname{cpp_lib_three_way_comparison}@ 201907L // also in \libheader{compare} #define @\defnlibxname{cpp_lib_to_address}@ 201711L // also in \libheader{memory} #define @\defnlibxname{cpp_lib_to_array}@ 201907L // also in \libheader{array} -#define @\defnlibxname{cpp_lib_to_chars}@ 201611L // also in \libheader{charconv} +#define @\defnlibxname{cpp_lib_to_chars}@ 202306L // also in \libheader{charconv} #define @\defnlibxname{cpp_lib_to_underlying}@ 202102L // also in \libheader{utility} #define @\defnlibxname{cpp_lib_transformation_trait_aliases}@ 201304L // also in \libheader{type_traits} #define @\defnlibxname{cpp_lib_transparent_operators}@ 201510L // also in \libheader{memory}, \libheader{functional} diff --git a/source/utilities.tex b/source/utilities.tex index 3a89948f7b..02efe320ba 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -14201,6 +14201,7 @@ char* ptr; errc ec; friend bool operator==(const to_chars_result&, const to_chars_result&) = default; + constexpr explicit operator bool() const noexcept { return ec == errc{}; } }; constexpr to_chars_result to_chars(char* first, char* last, @\placeholder{integer-type}@ value, int base = 10); @@ -14220,6 +14221,7 @@ const char* ptr; errc ec; friend bool operator==(const from_chars_result&, const from_chars_result&) = default; + constexpr explicit operator bool() const noexcept { return ec == errc{}; } }; constexpr from_chars_result from_chars(const char* first, const char* last,