http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48771

           Summary: [C++0x] is_literal_type incorrect for references to
                    non-literal types
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: daniel.krueg...@googlemail.com


gcc 4.7.0 20110423 (experimental) in C++0x mode rejects the following code:

//-----------
#include <type_traits>

struct NonLiteral {
  NonLiteral();
  ~NonLiteral();
};

static_assert(std::is_literal_type<NonLiteral&>::value, "Error"); // #1
static_assert(std::is_literal_type<NonLiteral&&>::value, "Error"); // #2
//-----------

because both assertions fire. This code should be accepted, because as of the
FDIS all reference types are literal types (similar to pointers).

Reply via email to