c++/57: [parser] templates in default arguments
Neil Booth
neil@daikokuya.co.uk
Wed Oct 23 12:36:00 GMT 2002
The following reply was made to PR c++/57; it has been noted by GNATS.
From: Neil Booth <neil@daikokuya.co.uk>
To: Wolfgang Bangerth <bangerth@ticam.utexas.edu>
Cc: nathan@codesourcery.com, gcc-bugs@gcc.gnu.org, gcc-gnats@gcc.gnu.org
Subject: Re: c++/57: [parser] templates in default arguments
Date: Wed, 23 Oct 2002 20:31:03 +0100
Wolfgang Bangerth wrote:-
>
> Nathan,
> the following code has, if I recall correctly, invalid syntax:
> ---------------------------------------------
> template <class T, class U>
> struct A {
> static const int n = 0;
> };
>
> template <class T>
> struct B
> {
> template <class U>
> void foo (int = A<T, U>::n) { }
> };
> ---------------------------------------------
> In the default argument parsing, there's a "," not nested inside
> parentheses. This stops default argument parsing. If you agree, then this
> report should be closed.
FWIW Comeau accepts it in strict conforming mode.
Neil.
More information about the Gcc-prs
mailing list