]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
2014-09-23 Paolo Carlini <paolo.carlini@oracle.com>
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 23 Sep 2014 08:09:14 +0000 (08:09 +0000)
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 23 Sep 2014 08:09:14 +0000 (08:09 +0000)
PR c++/62155
* g++.dg/cpp0x/lambda/lambda-62155.C: New.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@215497 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/lambda/lambda-62155.C [new file with mode: 0644]

index 08ba76443b12a4b852bca7084ed205bcf8ae5e09..ff5c5064a63b019737f0abea434c02f2e1bcdfb9 100644 (file)
@@ -1,3 +1,8 @@
+2014-09-23  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       PR c++/62155
+       * g++.dg/cpp0x/lambda/lambda-62155.C: New.
+
 2014-09-22  Paolo Carlini  <paolo.carlini@oracle.com>
 
        PR c++/62219
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-62155.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-62155.C
new file mode 100644 (file)
index 0000000..76eb2da
--- /dev/null
@@ -0,0 +1,8 @@
+// PR c++/62155
+// { dg-do compile { target c++11 } } 
+
+template <typename T> struct S { // { dg-error "cannot convert" }
+  T i{[this] {}};
+};
+
+S<int> s;                        // { dg-error "cannot convert" }