[cfe-dev] static const POD object

Dmitri Gribenko gribozavr at gmail.com
Mon Feb 18 08:21:52 PST 2013

On Mon, Feb 18, 2013 at 6:13 PM, zapadinsky <zapadinsky at gmail.com> wrote:
>>> [...] 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.

Now I see -- current text does not reflect his intention.  He might
have intended to change the whole paragraph, but he only changed the
second sentence.


(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/

More information about the cfe-dev mailing list