DIP 1015--Deprecation of Implicit Conversion of Int. & Char. Literals to bool--Formal Assement
Jacob Carlborg
doob at me.com
Wed Nov 14 11:09:33 UTC 2018
On 2018-11-14 03:45, Walter Bright wrote:
> On 11/13/2018 3:29 PM, Rubn wrote:
>> enum : int { a = 127 }
>
> To reiterate, this does not create an anonymous enum type. 'a' is typed
> as 'int'. Technically,
>
> `a` is a manifest constant of type `int` with a value of `127`.
>
> > enum A : int { a = 127 }
>
> `a` is a manifest constant of type `A` with a value of `127`.
>
> Remember that `A` is not an `int`.
What is ": int" doing, only specifying the size?
--
/Jacob Carlborg
More information about the Digitalmars-d-announce
mailing list