[ub] Proposal: make self-initialized references ill-formed (C++17?)
Jim Gimpel
jim.gimpel at gmail.com
Mon Sep 22 18:12:25 CEST 2014
I tried this with my favorite static analyzer (FlexeLint) and it issued a
Warning.
Jim Gimpel
On Mon, Sep 22, 2014 at 8:15 AM, John Zwinck <jzwinck at gmail.com> wrote:
> On Sun Sep 21 14:27:43 CEST 2014, Jens Maurer wrote:
> > On 09/18/2014 09:42 PM, Richard Smith wrote:
> > > FYI, this is core issue 504:
> > >
> > > http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#504
> >
> > ... which doesn't necessarily mean it will be automatically addressed by
> CWG
> > in the near future.
> >
> > Feel free to write a short paper suggesting specific wording changes to
> address
> > this issue. (Or, if just 1-2 sentence, send your wording changes to
> Mike Miller
> > if you won't attend WG21 meetings in person.)
>
> Understood. I will write some proposed wording here in the hope that
> someone might give feedback. In [dcl.init.ref] I would add a clause:
>
> ---
> The initializer shall not mention the reference being initialized.
> Any use of a reference which has not yet been initialized is
> ill-formed.
> ---
>
> I currently have no plans to attend WG21 meetings, but appreciate
> your time here.
>
> John Zwinck
> _______________________________________________
> ub mailing list
> ub at isocpp.open-std.org
> http://www.open-std.org/mailman/listinfo/ub
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.open-std.org/pipermail/ub/attachments/20140922/db20f81c/attachment.html
More information about the ub
mailing list