[cfe-dev] More extensive unused variable checks
silvas at purdue.edu
Tue Apr 16 16:27:33 PDT 2013
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
puts pretty stringent requirements on what a const function can do.
Basically any function marked const that is used in conjunction with the
standard library must be thread-safe (or else you get undefined behavior).
The const member function in your example can easily be seen to race in a
See this for more info:
So const may be strong enough for your analyses under the new rules.
-- Sean Silva
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-dev