This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [C++ PATCH] Fix PR/9154 (a trunk regression)


Falk Hueffner <falk.hueffner@student.uni-tuebingen.de> wrote:

> But ">>" *can* occur in a template list:

Wolfgang suggested even more cases in the PR audit trail
(http://gcc.gnu.org/PR9154). They are handled correctly by my patch, I
extended the testcase again, to support them.

Giovanni Bajo



// { dg-do compile }
// Origin: <tilps at hotmail dot com>
// c++/9154: poor error message for ">>" vs "> >" in template argument list

template <class T>
class A {};

template <int N>
void B(void) {}

template <int N = 123>>4>
struct C {};

template <int>      struct D {};
template <typename> struct E {};

E<D< 1>>2 > > E1;

const int x = 0;
E<D< 1>>x > > E2;


int main()
{
  B<256 >> 4>();
  A<A<int>> blah;  // { dg-error "" "should be '> >' within" }
}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]