[v3] is_literal_type tests
Jason Merrill
jason@redhat.com
Sat Nov 6 01:46:00 GMT 2010
On 11/05/2010 08:19 PM, Paolo Carlini wrote:
> 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?
I deliberately dropped the constraint on copy constructors, and have
proposed removing it from the standard.
Jason
More information about the Libstdc++
mailing list