Head Const

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Thu Feb 18 04:18:51 PST 2016


On 02/17/2016 05:44 PM, Walter Bright wrote:
> It would seem that implementing headconst as a type constructor would
> let people who wanted mutable members have their way, without
> introducing backdoors in const.

Doesn't seem that way to me, viz:

struct A
{
     int i;
}

A __const(A) will have a __const(int) member.


Andrei


More information about the Digitalmars-d mailing list