head const (again), but for free?

jmh530 john.michael.hall at gmail.com
Wed Jan 13 22:34:04 UTC 2021


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?

I liked Ola's description, but this one works through the basics 
in a way that really helps. So thanks.


More information about the Digitalmars-d mailing list