Skip to content

Commit d418f5d

Browse files
authored
Make compatible with C++20 and C++26
1 parent fcc8630 commit d418f5d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

absl/strings/charconv.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ enum class chars_format {
4747
struct from_chars_result {
4848
absl::Nonnull<const char*> ptr;
4949
std::errc ec;
50+
51+
bool operator==(const from_chars_result&) = default;
52+
53+
constexpr explicit operator bool() const noexcept { return ec == std::errc{}; }
5054
};
5155

5256
// Workalike compatibility version of std::from_chars from C++17. Currently

0 commit comments

Comments
 (0)