This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [C++ PATCH, RFC] Implement new C++ intrinsics __is_assignable and __is_constructible.
- From: Ville Voutilainen <ville dot voutilainen at gmail dot com>
- To: Daniel Krügler <daniel dot kruegler at gmail dot com>, Jason Merrill <jason at redhat dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, "libstdc++" <libstdc++ at gcc dot gnu dot org>
- Date: Fri, 12 May 2017 14:15:16 +0300
- Subject: Re: [C++ PATCH, RFC] Implement new C++ intrinsics __is_assignable and __is_constructible.
- Authentication-results: sourceware.org; auth=none
- References: <CAFk2RUZAj3wo0_ExOsRwZkMW-YvFjM4mtBi2-C+kHzX5ziTziw@mail.gmail.com> <CAGNvRgB23PyyzpxhkXbrUNesvtZXyKVGLNsEt=P78x0RSS3BsQ@mail.gmail.com>
On 12 May 2017 at 14:06, Daniel Krügler <daniel.kruegler@gmail.com> wrote:
> 2017-05-12 12:39 GMT+02:00 Ville Voutilainen <ville.voutilainen@gmail.com>:
>> I have tested this with the full suite on Linux-PPC64. It works otherwise fine,
>> but there's one snag: 20_util/unique_ptr/specialized_algorithms/swap_cxx17.cc
>> fails, and it looks like the trait ends up instantiating the definition
>> of a destructor, which then ends up being hard-error ill-formed.
>
> I'm pretty sure that the library-based implementation does not
> instantiate the destructor definition.
>
> Your description sounds remotely similar to me to the current problem
> of __is_trivially_constructible intrinsic, which seems to instantiate
> the copy constructor definition albeit it (IMO) shouldn't:
>
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80654
>
> Could there be a similar cause?
Seems quite plausible to me. I would be happy to fix that bug in the
same go, but I'm a bit
lost as to what exactly causes the problem. constructible_expr in method.c does
build_special_member_call for the constructor and the destructor, so
perhaps there
are some flags that could make it behave.