diff options
Diffstat (limited to 'gcc-4.9/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template13.C')
-rw-r--r-- | gcc-4.9/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template13.C | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template13.C b/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template13.C new file mode 100644 index 000000000..adbb4dbca --- /dev/null +++ b/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template13.C @@ -0,0 +1,20 @@ +// PR c++/61566 +// { dg-do compile { target c++11 } } + +struct function +{ + template < typename _Functor> + function (_Functor); +}; + +struct C +{ + template <typename T> + void foo (T, function = [] {}); +}; + +void bar () +{ + C c; + c.foo (1); +} |