This is the mail archive of the gcc@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]

Template declaration inside function



Given:


void f(void)
{
   template<typename T> class A
   {
   };
}

g++ 4.0/3.4 gives: bug.cpp:4: error: expected primary-expression before 'template'

Can a language lawer please confirm that this is even valid before I
create a PR?


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