Skip to content

Commit 68cd0fc

Browse files
committed
Fix code
1 parent 5ad6d25 commit 68cd0fc

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

absl/strings/charconv.h

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,14 @@ struct from_chars_result {
4848
const char* absl_nonnull ptr;
4949
std::errc ec;
5050

51-
bool operator==(const from_chars_result&) = default;
51+
constexpr friend bool operator==(const from_chars_result& l,
52+
const from_chars_result& r) noexcept {
53+
return l.ptr == r.ptr && l.ec == r.ec;
54+
}
5255

53-
constexpr explicit operator bool() const noexcept { return ec == std::errc{}; }
56+
constexpr explicit operator bool() const noexcept {
57+
return ec == std::errc{};
58+
}
5459
};
5560

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

0 commit comments

Comments
 (0)