3

[temp.res] reads

Knowing which names are type names allows the syntax of every template to be checked. The program is ill-formed, no diagnostic required, if: [...]

  • a hypothetical instantiation of a template immediately following its definition would be ill-formed due to a construct that does not depend on a template parameter, or

  • the interpretation of such a construct in the hypothetical instantiation is different from the interpretation of the corresponding construct in any actual instantiation of the template. [...]

What does interpretation here mean? Does it mean that each token must be interpreted as the same operator/entity/whatever grammatical construct, aka syntactically equivalent? Or does it mean that it has to also be semantically equivalent, as in the equivalence defined by the ODR rule?

As a side note, [temp.variadic] has the sentence

[...] Such an instantiation does not alter the syntactic interpretation of the enclosing construct [...]

Which has the explicit "syntactic".

Community
  • 1
  • 1
Passer By
  • 19,325
  • 6
  • 49
  • 96
  • 1
    Does reading [the issue description](http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1850) help? I'd say "interpret" is just... what does that construct mean per the rules of the abstract machine. See also [this example](https://stackoverflow.com/a/34170836/2069064) from T.C. – Barry Jul 24 '18 at 19:52
  • @Barry I think the example from T.C. is crystal clear, not so much the issue description :P. Should I mark as duplicate? – Passer By Jul 24 '18 at 19:59

0 Answers0