3 // Copyright (C) 2000 Free Software Foundation, Inc.
4 // Contributed by Nathan Sidwell 23 June 2000 <nathan@codesourcery.com>
6 // Origin GNATS bug report 10 from Ewgenij Gawrilow <gawrilow@math.TU-Berlin.DE>
7 // There is a grammar ambiguity with greater-than compare as a default
8 // template parameter value or template arg list. 14.2/2 and 14.1/15
9 // say how to resolve it, but we'd sometimes get it wrong.
11 template <int> class C { };
17 C<1>2> c3; // { dg-error "" } parse error
19 C<1 & 2>2> c5; // { dg-error "" } parse error
23 template <int i = 3>4 > class X1 {}; // { dg-error "" } parse error
24 template <int i = 3&&4>0 > class X2 {}; // { dg-error "" } parse error
25 template <int i = 3&&4 > class X3 {};
26 template <int i = (3>4) > class X4 {};