language: C++ 4.7.2 (gcc-4.7.2)
date: 332 days 12 hours ago
link:
visibility: public
1
2
3
4
5
6
7
8
9
10
11
12
struct A{};
 
struct B{
 template<class T = A>
 void foo(){}
};
 
int main()
{
   B b;
   b.foo();
}
prog.cpp:5: error: default template arguments may not be used in function templates
prog.cpp: In function ‘int main()’:
prog.cpp:11: error: no matching function for call to ‘B::foo()’