head const (again), but for free?
Q. Schroll
qs.il.paperinik at gmail.com
Thu Jan 14 01:07:38 UTC 2021
On Wednesday, 13 January 2021 at 22:34:04 UTC, jmh530 wrote:
> On Wednesday, 13 January 2021 at 22:15:59 UTC, Q. Schroll wrote:
>> [snip]
>>
>> int* q = &i;
>> head_immutable(int*)* qq = &p; // error, *qq could change
>> through q.
>>
>> Head immutable is more restrictive than head const, obviously.
>
> Should that last head_immutable be &q instead of &p?
Yes.
More information about the Digitalmars-d
mailing list