This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++ PATCH, RFC] Implement new C++ intrinsics __is_assignable and __is_constructible.
- From: Jonathan Wakely <jwakely at redhat dot com>
- To: Ville Voutilainen <ville dot voutilainen at gmail dot com>
- Cc: Daniel Krügler <daniel dot kruegler at gmail dot com>, Jason Merrill <jason at redhat dot com>, "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: Mon, 15 May 2017 11:56:33 +0100
- Subject: Re: [C++ PATCH, RFC] Implement new C++ intrinsics __is_assignable and __is_constructible.
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=jwakely at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 7044F37E65
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 7044F37E65
- References: <CAFk2RUZAj3wo0_ExOsRwZkMW-YvFjM4mtBi2-C+kHzX5ziTziw@mail.gmail.com> <CAGNvRgB23PyyzpxhkXbrUNesvtZXyKVGLNsEt=P78x0RSS3BsQ@mail.gmail.com> <CAFk2RUafnmokecDgnM3OFb0FZrqx8zNNiCVjE_FV=GN4uD7npQ@mail.gmail.com> <CAFk2RUb1sf7QNTGqEujfx2YmxJsx1+EuTca2GWs=t8ufVJQ6jA@mail.gmail.com>
On 12/05/17 21:33 +0300, Ville Voutilainen wrote:
libstdc++-v3/
Implement new C++ intrinsics __is_assignable and __is_constructible.
* include/std/type_traits (__do_is_static_castable_impl): Remove.
(__is_static_castable_impl, __is_static_castable_safe): Likewise.
(__is_static_castable, __do_is_direct_constructible_impl): Likewise.
(__is_direct_constructible_impl): Likewise.
(__is_direct_constructible_new_safe): Likewise.
(__is_base_to_derived_ref, __is_lvalue_to_rvalue_ref): Likewise.
(__is_direct_constructible_ref_cast): Likewise.
(__is_direct_constructible_new, __is_direct_constructible): Likewise.
(__do_is_nary_constructible_impl): Likewise.
(__is_nary_constructible_impl, __is_nary_constructible): Likewise.
(__is_constructible_impl): Likewise.
(is_constructible): Call the intrinsic.
(__is_assignable_helper): Remove.
(is_assignable): Call the intrinsic.
(is_trivially_constructible): Likewise.
(is_trivially_assignable): Likewise.
(testsuite/20_util/declval/requirements/1_neg.cc): Adjust.
(testsuite/20_util/make_signed/requirements/typedefs_neg.cc): Likewise.
(testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc):
Likewise.
The libstdc++ parts make me happy. I have fairly high confidence in
our tests for is_constructible and is_assignable (thanks, Daniel!) so
would be happy to approve the library parts.
I'll try the patch against the libc++ testsuite too.