This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [v3] is_literal_type tests


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]