Skip to content

Conversation

MBkkt
Copy link
Contributor

@MBkkt MBkkt commented Dec 29, 2024

@MBkkt MBkkt changed the title Make compatible with C++20 and C++26 Make absl::from_chars_result compatible with C++20 and C++26 Dec 29, 2024
absl::Nonnull<const char*> ptr;
std::errc ec;

bool operator==(const from_chars_result&) = default;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change doesn't work prior to C++20. You will have to implement the operator method.

/abseil-cpp/absl/strings/charconv.h:51:8: error: defaulted 'bool absl::from_chars_result::operator==(const absl::from_chars_result&)' only available with '-std=c++20' or '-std=gnu++20'
   51 |   bool operator==(const from_chars_result&) = default;

Also, I know this is a simple change, but it still needs test coverage.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@derekmauro Hi, I applied your suggestions to code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants