This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/57: [parser] templates in default arguments
- From: Wolfgang Bangerth <bangerth at ticam dot utexas dot edu>
- To: nobody at gcc dot gnu dot org
- Cc: gcc-prs at gcc dot gnu dot org,
- Date: 22 Oct 2002 23:56:02 -0000
- Subject: Re: c++/57: [parser] templates in default arguments
- Reply-to: Wolfgang Bangerth <bangerth at ticam dot utexas dot edu>
The following reply was made to PR c++/57; it has been noted by GNATS.
From: Wolfgang Bangerth <bangerth@ticam.utexas.edu>
To: nathan@codesourcery.com, <gcc-bugs@gcc.gnu.org>, <gcc-gnats@gcc.gnu.org>
Cc:
Subject: Re: c++/57: [parser] templates in default arguments
Date: Tue, 22 Oct 2002 18:47:32 -0500 (CDT)
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.
Regards
Wolfgang
-------------------------------------------------------------------------
Wolfgang Bangerth email: bangerth@ticam.utexas.edu
www: http://www.ticam.utexas.edu/~bangerth