Debian Codegraph @

gcc/testsuite/g++.dg/cpp0x/lambda/lambda-defarg10.C

raw
1 // PR c++/103186
2 // { dg-do compile { target c++11 } }
3
4 struct f
5 {
6 template<class T1>
7 f(const T1&){}
8 };
9
10
11 template<typename T> class A {
12 public:
13 void foo(A<T> a, const f& fn = [](){}) { }
14 void bar(A<T> a) { foo(a); }
15 };
16 int main() {
17 A<int> a;
18 a.foo(a);
19 a.bar(a);
20 return 0;
21 }