gcc/testsuite/g++.dg/cpp0x/lambda/lambda-defarg3.C
raw| 1 | // PR c++/55223 |
| 2 | // { dg-do compile { target c++11 } } |
| 3 | // { dg-options "-fabi-version=0" } |
| 4 | // { dg-final { scan-assembler "_ZN8functionC1IZN1CIiE4testES_Ed_UliE_EET_" } } |
| 5 | |
| 6 | struct function |
| 7 | { |
| 8 | template <class U> function(U u) { } |
| 9 | }; |
| 10 | |
| 11 | template<typename T> struct C |
| 12 | { |
| 13 | static T test(function f = [](int i){return i;}) { return T(); } |
| 14 | }; |
| 15 | |
| 16 | int main() |
| 17 | { |
| 18 | C<int>::test(); |
| 19 | } |