Open frederick-vs-ja opened 2 months ago
Using a program-defined specialization does not "instantiate the template" definition std::complex
provided by the standard library.
I'm not seeing anything editorial here.
Using a program-defined specialization does not "instantiate the template" definition
std::complex
provided by the standard library.
Thanks. Should we clarify that [complex.numbers.general]/2 is restricted to the primary template of complex
or leave the current wording as-is?
It says "the template", not "a template named std::complex
, so I'm not sure what clarification you seek. Are you talking about explicit specializations or partial specializations, by the way? The former are not templates.
It says "the template", not "a template named
std::complex
, so I'm not sure what clarification you seek.
I think the difference is somehow obscure if we just say "the template complex
" (only the primary template) and "a template named std::complex
“ (including program-defined partial specializations). Perhaps it would be clearer to say "the primary template of complex
", which shouldn't change the meaning.
Perhaps it would be clearer to say "the primary template of
complex
", which shouldn't change the meaning.
That seems reasonable to me.
[complex.numbers.general]/2 currently states:
Does this only cover the primary template, or even cover program-defined specializations? If the intent was the latter, I don't know how can this be correct due to the core language rules.
However, free functions in
<complex>
are unlikely to work for program-definedcomplex
specializations, which is a possible cause the current specification.