* [v3 PATCH] PR libstdc++/68430
@ 2017-12-16 12:30 Ville Voutilainen
2017-12-18 17:58 ` Jonathan Wakely
0 siblings, 1 reply; 2+ messages in thread
From: Ville Voutilainen @ 2017-12-16 12:30 UTC (permalink / raw)
To: gcc-patches, libstdc++
[-- Attachment #1: Type: text/plain, Size: 442 bytes --]
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.
[-- Attachment #2: 68430.diff --]
[-- Type: text/plain, Size: 449 bytes --]
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, "");
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [v3 PATCH] PR libstdc++/68430
2017-12-16 12:30 [v3 PATCH] PR libstdc++/68430 Ville Voutilainen
@ 2017-12-18 17:58 ` Jonathan Wakely
0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Wakely @ 2017-12-18 17:58 UTC (permalink / raw)
To: Ville Voutilainen; +Cc: gcc-patches, libstdc++
On 16 December 2017 at 12:30, Ville Voutilainen wrote:
> 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?
OK, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-12-18 17:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-16 12:30 [v3 PATCH] PR libstdc++/68430 Ville Voutilainen
2017-12-18 17:58 ` Jonathan Wakely
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).