aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/pr52440.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/g++.dg/cpp0x/pr52440.C')
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/cpp0x/pr52440.C27
1 files changed, 27 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/pr52440.C b/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/pr52440.C
new file mode 100644
index 0000000..0210f53
--- /dev/null
+++ b/gcc-4.9/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);
+}