aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-defarg3.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-defarg3.C')
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-defarg3.C19
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-defarg3.C b/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-defarg3.C
new file mode 100644
index 0000000..1c59393
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-defarg3.C
@@ -0,0 +1,19 @@
+// PR c++/55223
+// { dg-do compile { target c++11 } }
+// { dg-options "-fabi-version=0" }
+// { dg-final { scan-assembler "_ZN8functionC1IZN1CIiE4testES_Ed_UliE_EET_" } }
+
+struct function
+{
+ template <class U> function(U u) { }
+};
+
+template<typename T> struct C
+{
+ static T test(function f = [](int i){return i;}) { }
+};
+
+int main()
+{
+ C<int>::test();
+}