[v3 PATCH] PR libstdc++/68430

Ville Voutilainen ville.voutilainen@gmail.com
Sat Dec 16 12:30:00 GMT 2017


The compiler-powered is_constructible that we have in gcc 8 is powerful
enough to give the right answer to an is_constructible question
that would be hard for a pure-library implementation to get right
in a well-formed fashion. This is just adding a test for it. Tested
on Linux-PPC64, OK for trunk?

2017-12-16  Ville Voutilainen  <ville.voutilainen@gmail.com>

    PR libstdc++/68430
    * testsuite/20_util/is_constructible/68430.cc: New.
-------------- next part --------------
diff --git a/libstdc++-v3/testsuite/20_util/is_constructible/68430.cc b/libstdc++-v3/testsuite/20_util/is_constructible/68430.cc
new file mode 100644
index 0000000..3f880b3
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/is_constructible/68430.cc
@@ -0,0 +1,6 @@
+// { dg-do compile { target c++11 } }
+
+#include <type_traits>
+
+template<class T> struct Foo { Foo(T = nullptr) {} };
+static_assert(!std::is_constructible<Foo<int>>::value, "");


More information about the Libstdc++ mailing list