[cfe-dev] More extensive unused variable checks
silvas at purdue.edu
Tue Apr 16 17:09:40 PDT 2013
On Tue, Apr 16, 2013 at 7:45 PM, David Blaikie <dblaikie at gmail.com> wrote:
> On Tue, Apr 16, 2013 at 4:27 PM, Sean Silva <silvas at purdue.edu> wrote:
> > On Tue, Apr 16, 2013 at 2:32 PM, Daniel B Mosesson <
> dmosess1 at binghamton.edu>
> > wrote:
> >> Not really. Const does not enforce no I/O and no modification of
> >> pointer targets.
> > For types used in conjunction with the standard library, C++11 actually
> > pretty stringent requirements on what a const function can do. Basically
> > function marked const that is used in conjunction with the standard
> > must be thread-safe (or else you get undefined behavior).
> I've heard about Herb Sutter talking about this, but I didn't/don't
> think it's actually enshrined in the standard, is it?
He quotes standard language in that talk. Also, I pretty much trust what
Herb Sutter has to say about these things.
Besides, I like the "thread-safe const/mutable" semantics, so I am biased
towards being willing to believe it ;)
-- Sean Silva
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-dev