g++-980221 constructor template instantiation bug

Dirk Herrmann dirk@ida.ing.tu-bs.de
Mon Feb 23 08:47:00 GMT 1998


Hello everybody!

Special hello and thanks for previous help to Mark!

 
 
The following code won't get compiled by egcs:

--------------------------------------------------------------------- 
struct X 
{
    template<class A, class B>
    X(const A&, const B&);
};
 
int f();
 
main()
{
    X("", f());         // this line is parsed OK
    X(f(), "");         // line 12
}
--------------------------------------------------------------------- 

> g++ test.cc
test.cc: In function `int main()':
test.cc:12: parse error before `,'


Best regards, 
Dirk Herrmann





More information about the Gcc-bugs mailing list