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

           Summary: gcc accepts static data member declaration with
                    initializer for non-const literal type if
                    type-specifier is auto
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: boost...@gmail.com


gcc accepts static data member declaration with brace-or-equal-initializer for
non-const literal type, when the type-specifier is the plain auto specifier.

struct X
{
    static auto member = 0 ;
} ;

The type of X::member is deduced to be int.
But static data member declaration is allowed to have
brace-or-equal-initializer if the type is const literal type.

So this code must be ill-formed.

Reply via email to