]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
2013-06-10 Paolo Carlini <paolo.carlini@oracle.com>
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 10 Jun 2013 16:07:29 +0000 (16:07 +0000)
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 10 Jun 2013 16:07:29 +0000 (16:07 +0000)
PR c++/52440
* g++.dg/cpp0x/pr52440.C: New.

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

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

index 1727138fb98fe3560648c4716a5dbb1e73868a09..b718d6947ee3ffaefaf56c3e1925c7618738d2d0 100644 (file)
@@ -1,3 +1,8 @@
+2013-06-10  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       PR c++/52440
+       * g++.dg/cpp0x/pr52440.C: New.
+
 2013-06-10  Jakub Jelinek  <jakub@redhat.com>
 
        PR target/56564
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr52440.C b/gcc/testsuite/g++.dg/cpp0x/pr52440.C
new file mode 100644 (file)
index 0000000..0210f53
--- /dev/null
@@ -0,0 +1,27 @@
+// PR c++/52440
+// { dg-do compile { target c++11 } }
+
+template<bool>
+struct V
+{
+  typedef void type;
+};
+
+template<typename T>
+struct X
+{
+  template<typename>
+  static constexpr bool always_true()
+  {
+    return true;
+  }
+
+  template<typename U,
+           typename = typename V<always_true<U>()>::type>
+  X(U &&) {}
+};
+
+int main()
+{
+  X<int> x(42);
+}