Skip to content

Commit b9a6c7b

Browse files
jwakelytkoeppe
authored andcommitted
P2497R0 Testing for success or failure of <charconv> functions
1 parent c89ceed commit b9a6c7b

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

source/support.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -735,7 +735,7 @@
735735
#define @\defnlibxname{cpp_lib_three_way_comparison}@ 201907L // also in \libheader{compare}
736736
#define @\defnlibxname{cpp_lib_to_address}@ 201711L // also in \libheader{memory}
737737
#define @\defnlibxname{cpp_lib_to_array}@ 201907L // also in \libheader{array}
738-
#define @\defnlibxname{cpp_lib_to_chars}@ 201611L // also in \libheader{charconv}
738+
#define @\defnlibxname{cpp_lib_to_chars}@ 202306L // also in \libheader{charconv}
739739
#define @\defnlibxname{cpp_lib_to_underlying}@ 202102L // also in \libheader{utility}
740740
#define @\defnlibxname{cpp_lib_transformation_trait_aliases}@ 201304L // also in \libheader{type_traits}
741741
#define @\defnlibxname{cpp_lib_transparent_operators}@ 201510L // also in \libheader{memory}, \libheader{functional}

source/utilities.tex

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14201,6 +14201,7 @@
1420114201
char* ptr;
1420214202
errc ec;
1420314203
friend bool operator==(const to_chars_result&, const to_chars_result&) = default;
14204+
constexpr explicit operator bool() const noexcept { return ec == errc{}; }
1420414205
};
1420514206

1420614207
constexpr to_chars_result to_chars(char* first, char* last, @\placeholder{integer-type}@ value, int base = 10);
@@ -14220,6 +14221,7 @@
1422014221
const char* ptr;
1422114222
errc ec;
1422214223
friend bool operator==(const from_chars_result&, const from_chars_result&) = default;
14224+
constexpr explicit operator bool() const noexcept { return ec == errc{}; }
1422314225
};
1422414226

1422514227
constexpr from_chars_result from_chars(const char* first, const char* last,

0 commit comments

Comments
 (0)