[Bug c++/21903] Default argument of template function causes a compile-time error

pinskia at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Fri Jun 3 20:22:00 GMT 2005


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-06-03 20:22 -------
This is invalid code and the error is correct.  The default argument has not been parsed at the point you 
called it.

ICC and Comeau gives a slightly different error message which I think is misleading:
"ComeauTest.c", line 35: error: too few arguments in function call
                  c.set( "   To be or not to be   \n\n" );

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21903



More information about the Gcc-bugs mailing list