This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Template parameters problem
- From: Pierre Chatelier <pierre dot chatelier at club-internet dot fr>
- To: gcc-help at gcc dot gnu dot org
- Date: Tue, 27 Jun 2006 19:35:38 +0200
- Subject: 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