fix: resolve Symbol::For overload ambiguity - #1742
Open
umuoy1 wants to merge 4 commits into
Open
Conversation
Signed-off-by: umuoy1 <burningdian@gmail.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1742 +/- ##
==========================================
- Coverage 63.69% 63.68% -0.02%
==========================================
Files 3 3
Lines 2063 2065 +2
Branches 730 731 +1
==========================================
+ Hits 1314 1315 +1
Misses 162 162
- Partials 587 588 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
legendecas
reviewed
Aug 8, 2026
Signed-off-by: umuoy1 <burningdian@gmail.com>
Signed-off-by: umuoy1 <burningdian@gmail.com>
legendecas
reviewed
Aug 9, 2026
Signed-off-by: umuoy1 <burningdian@gmail.com>
legendecas
reviewed
Aug 9, 2026
| }; | ||
|
|
||
| template <typename T, typename = void> | ||
| struct has_unambiguous_symbol_for_overload : std::false_type {}; |
Member
There was a problem hiding this comment.
Suggested change
| struct has_unambiguous_symbol_for_overload : std::false_type {}; | |
| struct has_unambiguous_string_convertible_overload : std::false_type {}; |
| struct has_unambiguous_symbol_for_overload : std::false_type {}; | ||
|
|
||
| template <typename T> | ||
| struct has_unambiguous_symbol_for_overload< |
Member
There was a problem hiding this comment.
Suggested change
| struct has_unambiguous_symbol_for_overload< | |
| struct has_unambiguous_string_convertible_overload< |
| // Exclude nullptr because it matches the pointer overloads equally well and | ||
| // cannot safely initialize a std::string_view. | ||
| template <typename T> | ||
| using enable_if_ambiguous_symbol_for_t = |
Member
There was a problem hiding this comment.
Suggested change
| using enable_if_ambiguous_symbol_for_t = | |
| using enable_if_ambiguous_string_convertible_t = |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Symbol::Foran ambiguous for types that can convert to bothstd::stringandstd::string_view.Instead of removing the existing
std::stringoverload, this keep it so string-only wrappers continue to work and adds a constrained forwarding overload for the ambiguous case. Calls that already have a unique best match keep using the existing overloads.Fixes #1741