[C++ PATCH, RFC] Implement new C++ intrinsics __is_assignable and __is_constructible.
Ville Voutilainen
ville.voutilainen@gmail.com
Fri May 12 11:15:00 GMT 2017
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.
More information about the Libstdc++
mailing list