c++/57: [parser] templates in default arguments
Wolfgang Bangerth
bangerth@ticam.utexas.edu
Tue Oct 22 16:49:00 GMT 2002
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
More information about the Gcc-bugs
mailing list