aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorPaolo Carlini <paolo.carlini@oracle.com>2013-06-10 16:07:29 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2013-06-10 16:07:29 +0000
commitf88ce95e40f1767057cefb06df0c18534ab51d6a (patch)
treee67c2e877c399c65d00448ef90272c6855fb1695 /gcc
parentdf8a1d28a50fe32dc87f989ba0a72f00227a38ec (diff)
downloadgcc-f88ce95e40f1767057cefb06df0c18534ab51d6a.zip
gcc-f88ce95e40f1767057cefb06df0c18534ab51d6a.tar.gz
gcc-f88ce95e40f1767057cefb06df0c18534ab51d6a.tar.bz2
re PR c++/52440 ([C++11] Wrong template argument deduction/substitution failures)
2013-06-10 Paolo Carlini <paolo.carlini@oracle.com> PR c++/52440 * g++.dg/cpp0x/pr52440.C: New. From-SVN: r199899
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr52440.C27
2 files changed, 32 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 1727138..b718d69 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -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
index 0000000..0210f53
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/pr52440.C
@@ -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);
+}