-
Notifications
You must be signed in to change notification settings - Fork 382
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(common): workaround GCC "ambiguous" overload errors #9144
fix(common): workaround GCC "ambiguous" overload errors #9144
Conversation
Google Cloud Build Logs
ℹ️ NOTE: Kokoro logs are linked from "Details" below. |
Codecov Report
@@ Coverage Diff @@
## main #9144 +/- ##
=======================================
Coverage 94.34% 94.34%
=======================================
Files 1435 1435
Lines 128262 128267 +5
=======================================
+ Hits 121004 121011 +7
+ Misses 7258 7256 -2
Continue to review full report at Codecov.
|
We used to write code like this: ```cc template <typename U> static auto constexpr E(U& u) { return std::move(*u.mutable_next_page_token()); } template <typename U> static auto constexpr E(U& u) { return std::move(u.next_page_token); } ``` The idea is that only one of these overloads would be available because of SFINAE. Some versions of GCC complain that this is ambiguous.
5970fbe
to
33ee087
Compare
Google Cloud Build Logs
ℹ️ NOTE: Kokoro logs are linked from "Details" below. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 2 of 2 files at r1, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @coryan)
We used to write code like this:
The idea is that only one of these overloads would be available because
of SFINAE. Some versions of GCC complain that this is ambiguous.
Fixes #9111
This change is