Template parameters problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux