[dox] enum specs vs reality
Jacob Carlborg
doob at me.com
Wed Aug 28 00:21:24 PDT 2013
On 2013-08-28 04:27, Andre Artus wrote:
> 2. The example from p.69 [TDPL]. It seems to be missing a colon after
> "enum".
> enum size_t g_maxDataSize = 100_000_000, g_maxMemory = 1_000_000_000;
>
> I hope someone can clear up what is and isn't a valid enum.
I haven't looked at this in TPL but the above is a manifest constant.
Which basically has nothing to do with enums. It's a way to declare a
constant that doesn't have any storage and which address cannot be
taken. Basically the same as "#define foo 0" in C.
--
/Jacob Carlborg
More information about the Digitalmars-d
mailing list