Skip to content
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 ambiguity with ct #186

Merged
merged 1 commit into from
Jan 9, 2025
Merged

🐛 Fix ambiguity with ct #186

merged 1 commit into from
Jan 9, 2025

Conversation

elbeno
Copy link
Contributor

@elbeno elbeno commented Jan 9, 2025

Problem:

  • ct must use a function template to obtain overloads for both type template parameters and NTTPs. However when using ct with an NTTP placeholder type there is an ambiguity if the NTTP is not deduced: both the auto overload and the ct_string overloads match.

Solution:

  • Introduce another NTTP placeholder type, ct_helper that can be partially specialized without definition to disable the primary template specialization.

Problem:
- `ct` must use a function template to obtain overloads for both type template
  parameters and NTTPs. However when using `ct` with an NTTP placeholder type
  there is an ambiguity if the NTTP is not deduced: e.g. if a non-deduced
  `ct_string` is passed, both the `auto` overload and the `ct_string` overloads
  match.

Solution:
- Introduce another NTTP placeholder type, `ct_helper` that can be partially
  specialized (without definition) to disable the primary template specialization.
@elbeno elbeno merged commit 2834680 into intel:main Jan 9, 2025
32 checks passed
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.

2 participants