This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Template parameters problem


Hello,

gcc reports an error that I do not understand; does anyone know if it is a bug or some corner case of the standard ?

#include <map>
#include <string>
using namespace std;

void resetBar(const map<int,char>& foo = map<int,char>())
{
}//ok

struct Foo
{
void resetFoo(const map<int,char>& foo = map<int,char>())
{
}//error (main.cpp:11: error: expected ',' or '...' before '>' token
main.cpp:11: error: wrong number of template arguments (1, should be 4))
};


Regards,

Pierre Chatelier


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]