How to break const

Christophe Travert travert at phare.normalesup.org
Tue Jun 19 10:47:14 PDT 2012


Timon Gehr , dans le message (digitalmars.D:170185), a écrit :
> On 06/19/2012 07:18 PM, Christophe Travert wrote:
> In 2., mutable data referred to by a const reference might be changed 
> through it.

Then it is not a const reference, it is a normal reference. Qualifying 
the reference as 'const' does not by you anything at all. Of course it 
should not change immutable data, no delegate should do that !

You might state that frame pointer are opaque, have no const qualifier, 
and that any delegates is callable even if they are in a const 
structure. But saying a reference (frame pointer) can be const AND 
modify data is a bit weird.

-- 
Christophe


More information about the Digitalmars-d mailing list