PhobosWatch: manifest => enum

Russell Lewis webmaster at villagersonline.com
Wed Jan 2 11:31:58 PST 2008


Janice Caron wrote:
> On 1/2/08, Russell Lewis <webmaster at villagersonline.com> wrote:
>> I'll ignore for the moment the (very tricky) problem of assigning copies
>> of const structs.  Just for basic types, we could easily solve this by
>> requiring the syntax "const auto" when we wanted a constant:
>>
>>      const int X = 3;
>>            auto i = X;
>>      const auto j = X;
>>      i = 4; // legal, typeof(i) is int
> 
> But typeof(i) /isn't/ int. typeof(i) is const(int). The problem is not
> how to make a const copy of a const primitive - it's how to make a
> mutable copy of a const primitive.

I was suggesting how things *should* be, not how they are.  Sorry if I 
didn't make that clear.



More information about the Digitalmars-d mailing list