On 2/18/2016 4:18 AM, Andrei Alexandrescu wrote:
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.
struct A { int* pi; } and *pi will be mutable even though pi is __const.