C++ Logo

std-discussion

Advanced search

Re: Unclear template type equivalence for decltype(dependent expression)

From: mauro russo <ing.russomauro_at_[hidden]>
Date: Tue, 12 Nov 2024 12:49:08 +0100
> Not really:
> template<int x>
> struct A { };

But... [temp.over.link]-5 reads
"... and the tokens used to form concept-ids ([temp.names]
<https://eel.is/c++draft/temp.names>) may differ as long as the two
*template-id* <https://eel.is/c++draft/temp.names#nt:template-id>*s* are
the same ([temp.type] <https://eel.is/c++draft/temp.type>).
<https://eel.is/c++draft/temp.over.link#5.sentence-2>"

I mean, well, [temp.type]-2 is clear about "same" template-ids, not
requiring the same tokens.
Why in [temp.over.link]-5 we need this example that has nothing more than
the Example 1 in [temp.type]-3 for 'x' and 'y' ?

That's why I supposed that A<40> and A<42> were related to the statement on
unevaluated operands,
as example of same (simple-)template-ids representing the concept-ids
([temp.names]-9, currently ยง13.3-9).
Should it be replaced with an example showing concept-ids with different
tokens ?


Also, hope you will answer to my comments a)-e) from
https://lists.isocpp.org/std-discussion/current/2686.php.
or make it explicit that in your opinion they are worthless.

Thanks,
Mauro.

Received on 2024-11-12 11:49:20