diff mbox

[C++,testcase,committed] PR 52440

Message ID 51B5FA49.4030705@oracle.com
State New
Headers show

Commit Message

Paolo Carlini June 10, 2013, 4:09 p.m. UTC
Hi,

committed to mainline.

Thanks,
Paolo.

////////////////////
2013-06-10  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/52440
	* g++.dg/cpp0x/pr52440.C: New.
diff mbox

Patch

Index: g++.dg/cpp0x/pr52440.C
===================================================================
--- g++.dg/cpp0x/pr52440.C	(revision 0)
+++ g++.dg/cpp0x/pr52440.C	(working copy)
@@ -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);
+}