gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template13.C
raw| 1 | // PR c++/61566 |
| 2 | // { dg-do compile { target c++11 } } |
| 3 | |
| 4 | struct function |
| 5 | { |
| 6 | template < typename _Functor> |
| 7 | function (_Functor) {} |
| 8 | }; |
| 9 | |
| 10 | template <class U> |
| 11 | struct C |
| 12 | { |
| 13 | template <typename T> |
| 14 | void foo (T, function = [] {}); |
| 15 | }; |
| 16 | |
| 17 | void bar () |
| 18 | { |
| 19 | C<int> c; |
| 20 | c.foo (1); |
| 21 | } |
| 22 | |
| 23 | // { dg-final { scan-assembler "_ZN8functionC1IZN1CIiE3fooIiEEvT_S_Ed_UlvE_EES4_" } } |
| 24 | // { dg-final { scan-assembler-not "_ZZN1CIiE3fooIiEEvT_8functionEd_NKUlvE_clEv" } } |