This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [v3 PATCH] Implement std::is_aggregate.
- From: Ville Voutilainen <ville dot voutilainen at gmail dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: "libstdc++" <libstdc++ at gcc dot gnu dot org>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Sun, 2 Apr 2017 12:24:16 +0300
- Subject: Re: [v3 PATCH] Implement std::is_aggregate.
- Authentication-results: sourceware.org; auth=none
- References: <CAFk2RUZzdhAD8gXMFGKL0KKKF1p9Pzr8=+dzBrCfH-astcSKYg@mail.gmail.com> <20170402053514.GZ17461@tucnak>
On 2 April 2017 at 08:35, Jakub Jelinek <jakub@redhat.com> wrote:
>> + remove_cv_t<_Tp>
>> + )>
>
> Any reason for the wrapping?
No, it's just a result of a nocturnal copy-paste-job of the existing
code for has_unique_object_representations.
> Also, shouldn't there be also:
>
> /// is_aggregate_v
> template<typename _Tp>
> _GLIBCXX17_INLINE constexpr bool is_aggregate_v =
> is_aggregate<_Tp>::value;
>
> somewhere with appropriate guards (or within the same ones)?
Yes, well spotted. I will add that.
> I'm surprised tests for the is_*_v variable templates are only in
> experimental/type_traits/value.cc when they are now apparently
> part of C++17.
Perhaps 20_util/variable_templates_for_traits.cc ?