Patchwork [C++,testcase,committed] PR 52440

login
register
mail settings
Submitter Paolo Carlini
Date June 10, 2013, 4:09 p.m.
Message ID <51B5FA49.4030705@oracle.com>
Download mbox | patch
Permalink /patch/250284/
State New
Headers show

Comments

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

committed to mainline.

Thanks,
Paolo.

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

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

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);
+}