<div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote">On Tue, Apr 16, 2013 at 2:32 PM, Daniel B Mosesson <span dir="ltr"><<a href="mailto:dmosess1@binghamton.edu" target="_blank">dmosess1@binghamton.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Not really. Const does not enforce no I/O and no modification of<br>

pointer targets.</blockquote><div><br></div><div style>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 multithreaded context. </div>
<div style><br></div><div style>See this for more info:</div><div style><a href="http://channel9.msdn.com/posts/C-and-Beyond-2012-Herb-Sutter-You-dont-know-blank-and-blank">http://channel9.msdn.com/posts/C-and-Beyond-2012-Herb-Sutter-You-dont-know-blank-and-blank</a><br>
</div><div style><br></div><div style>So const may be strong enough for your analyses under the new rules.<br></div><div style><br></div><div style>-- Sean Silva</div></div></div></div>