<div class="gmail_quote">2010/11/30 Walter Bright <span dir="ltr"><<a href="mailto:newshound2@digitalmars.com">newshound2@digitalmars.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">so wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
No need to go that far.<br>
<br>
void fn(const A, A) {...}<br>
A a;<br>
fn(a, a); // what do you expect here?<br>
<br>
As far as i know D/C++ have the same treatment for const member functions.<br>
It has been this way forever.<br>
</blockquote>
<br>
<br></div>
Yup. It's why I think it is worthwhile that I spend time in this thread explaining things over and over. There are a lot of mistaken assumptions and baggage people carry around about const in both D and C++.<br>
<br></blockquote><div><br></div><div>I've been following this thread on and off, but is there a definition somewhere of exactly what "const" means in D2 and exactly what that guaranties or doesn't guaranty? </div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
(One of the ironies of C++ const is that programmers assume it behaves like D const/immutable, but rely on it not doing so.)<br>
</blockquote></div><br>