PhobosWatch: manifest => enum

Walter Bright newshound1 at digitalmars.com
Sat Dec 29 01:59:52 PST 2007


Janice Caron wrote:
> On 12/29/07, Don Clugston <dac at nospam.com.au> wrote:
>> Does this compile?
>>
>> enum : cfloat { A=2, B, C }
> 
> Even more interestingly, what about
> 
>     enum : ifloat { a = 2i, b };
> 
> If b has to equal (a+1), then there is no way it can be the same type as a.

It would give the same result as:

	ifloat b = a + 1;



More information about the Digitalmars-d mailing list