On 05.02.2018 06:06, Simon Marchi wrote:
On 2018-02-04 02:17 PM, Martin Sebor wrote:
Printing the suffix is unhelpful because it leads to unnecessary
differences in diagnostics (even in non-template contexts).  For
templates with non-type template parameters there is no difference
between, say A<1>, A<1U>, A<(unsigned) 1>, or even A<Green> when
Green is an enumerator that evaluates to 1, so including the suffix
serves no useful purpose.

This is the part I don't understand.  In Roman's example, spelling
foo<10> and foo<10u> resulted in two different instantiations of the
template, with different code.  So that means it can make a difference,
can't it?

Yes, for non-type template parameters whose type contains a placeholder type (i.e., "auto IVAL" in the earlier example), which is a new feature of C++17.

My understanding is that printing the suffix would be essential in such cases.

Reply via email to