Skip to content

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
@elbeno elbeno deleted the fix-ct-ambiguity branch October 16, 2025 20:09
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