Logical const

Walter Bright newshound2 at digitalmars.com
Tue Nov 30 11:07:51 PST 2010


Steven Schveighoffer wrote:
> What guarantees?  Const provides no guarantees.

1. That nobody will modify any of the data structure accessed through the const 
reference provided. Thus, if your data is immutable, unique, or the function is 
pure, you are guaranteed it will not be modified.

2. That another thread will not be modifying any of that data structure.


More information about the Digitalmars-d mailing list