Annex G (informative) Ill-formed, no diagnostic required [ifndr]

G.5 [stmt]: Statements [ifndr.stmt]

G.5.1[ifndr:stmt.ambig.bound.diff.parse]
Specified in: [stmt.ambig]

If, during parsing, a name in a template parameter is bound differently than it would be bound during a trial parse, the program is ill-formed.
No diagnostic is required.
[Example 1: template <int N> struct A { const static int a = 20; }; template <> struct A<100> { using a = char; }; const int x = 10; int main() { using T = const int; T(x) (100), (y)(A<x>::a); // IFNDR, during trial parse the template parameter x is bound to // the global x later during parsing the template parameter x // is bound to the local x declared on the same line } — end example]