This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [v3] is_literal_type tests
- From: Paolo Carlini <paolo dot carlini at oracle dot com>
- To: Benjamin Kosnik <bkoz at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org, libstdc++ at gcc dot gnu dot org, Jason Merrill <jason at redhat dot com>
- Date: Sat, 06 Nov 2010 01:19:44 +0100
- Subject: Re: [v3] is_literal_type tests
- References: <20101105155006.103e19a0@shotwell>
On 11/05/2010 11:50 PM, Benjamin Kosnik wrote:
> Of note on this is the divergence with is_literal_type and 3.9p10. As
> per:
>
> struct NLType // not literal type?
> {
> int _M_i;
>
> NLType() : _M_i(0) { }
>
> constexpr NLType(int __i) : _M_i(__i) { }
>
> NLType(const NLType& __other) : _M_i(__other._M_i) { }
> };
>
> This is a literal_type as per std::is_literal_type, even with
> non-trivial default constructor and copy constructors
> that via 3.9p10 would be expected to fail.
>
Interesting indeed. Thus, does this imply something is wrong with
__is_literal_type? Is this a known issue?
Thanks,
Paolo.