Head Const

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Thu Feb 18 04:03:00 PST 2016


On 2/18/2016 2:47 AM, Timon Gehr wrote:
> On 18.02.2016 10:24, Walter Bright wrote:
>> On 2/17/2016 11:58 PM, Timon Gehr wrote:
>>> const(headconst(T)) is the same as const(T), no?
>>
>> Er, yes?
>
> Jonathan wanted to embed a mutable reference count within a const object.
> Contrary to your suggestion, headconst won't help with that.


Of course it will:

headconst pointer -> pointer -> refcount
                   -> const pointer -> ... constant stuff ...





More information about the Digitalmars-d mailing list