From: Ville Voutilainen <ville.voutilainen@gmail.com>
To: Jonathan Wakely <jwakely@redhat.com>
Cc: Tim Shen <timshen@google.com>,
"libstdc++" <libstdc++@gcc.gnu.org>,
gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [Patch] Forward triviality in variant
Date: Thu, 01 Jun 2017 15:21:00 -0000 [thread overview]
Message-ID: <CAFk2RUZX+UcWg68yT-TXZj6sXcExzvHB4x9xg4bkN_eZvQb91Q@mail.gmail.com> (raw)
In-Reply-To: <20170601151302.GA10443@redhat.com>
On 1 June 2017 at 18:13, Jonathan Wakely <jwakely@redhat.com> wrote:
> On 30/05/17 02:16 -0700, Tim Shen via libstdc++ wrote:
>>
>> diff --git a/libstdc++-v3/include/std/variant
>> b/libstdc++-v3/include/std/variant
>> index b9824a5182c..f81b815af09 100644
>> --- a/libstdc++-v3/include/std/variant
>> +++ b/libstdc++-v3/include/std/variant
>> @@ -290,6 +290,53 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
>> __ref_cast<_Tp>(__t));
>> }
>>
>> + template<typename... _Types>
>> + struct _Traits
>> + {
>> + static constexpr bool is_default_constructible_v =
>> + is_default_constructible_v<typename _Nth_type<0,
>> _Types...>::type>;
>> + static constexpr bool is_copy_constructible_v =
>> + __and_<is_copy_constructible<_Types>...>::value;
>> + static constexpr bool is_move_constructible_v =
>> + __and_<is_move_constructible<_Types>...>::value;
>> + static constexpr bool is_copy_assignable_v =
>> + is_copy_constructible_v && is_move_constructible_v
>> + && __and_<is_copy_assignable<_Types>...>::value;
>> + static constexpr bool is_move_assignable_v =
>> + is_move_constructible_v
>> + && __and_<is_move_assignable<_Types>...>::value;
>
>
> It seems strange to me that these ones end with _v but the following
> ones don't. Could we make them all have no _v suffix?
Seems to me worth considering to rather make all of them have a _v suffix. :)
>
>> + static constexpr bool is_dtor_trivial =
>> + __and_<is_trivially_destructible<_Types>...>::value;
They all seem to be shortcuts for something::value, so it seems to me
logical to have
them all be _v.
next prev parent reply other threads:[~2017-06-01 15:21 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-30 6:36 Tim Shen via gcc-patches
2017-05-30 9:41 ` Tim Shen via gcc-patches
2017-06-01 15:13 ` Jonathan Wakely
2017-06-01 15:21 ` Ville Voutilainen [this message]
2017-06-01 15:29 ` Jonathan Wakely
2017-06-01 15:43 ` Ville Voutilainen
2017-06-01 16:03 ` Jonathan Wakely
2017-06-01 16:07 ` Ville Voutilainen
2017-06-01 16:13 ` Jonathan Wakely
2017-06-18 19:37 ` Tim Shen via gcc-patches
2017-06-27 15:43 ` Jonathan Wakely
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAFk2RUZX+UcWg68yT-TXZj6sXcExzvHB4x9xg4bkN_eZvQb91Q@mail.gmail.com \
--to=ville.voutilainen@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jwakely@redhat.com \
--cc=libstdc++@gcc.gnu.org \
--cc=timshen@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).