[cfe-dev] static const POD object

zapadinsky zapadinsky at gmail.com
Mon Feb 18 08:13:32 PST 2013


>> [...] if the object is of const-qualified 
>> type, the underlying class type shall have a user-declared default 
>> constructor. [...] 
>
>This requires a user-declared default constructor in this case. 

Judy Ward suggestion was "It should be made clear that this paragraph does
not apply to static objects."

His suggestion was to allow instantiate a zero initialized static const
object. It was marked as resolved by adding "Otherwise, if no initializer is
specified for a non-static object..." So the authors of the standard either
did not understand his idea or I am right and clang shouldn't issue an error
on this code.



--
View this message in context: http://clang-developers.42468.n3.nabble.com/static-const-POD-object-tp4030470p4030475.html
Sent from the Clang Developers mailing list archive at Nabble.com.



More information about the cfe-dev mailing list