PhobosWatch: manifest => enum
Hxal
hxal at freenode.d.channel
Fri Dec 28 14:15:29 PST 2007
Janice Caron Wrote:
> On 12/28/07, "Jérôme M. Berger" <jeberger at free.fr> wrote:
> > > I understand your point, but also consider that adding yet a fourth way
> > > to declare constants
>
> Actually, I think that's a fifth way. You may have forgotten about
>
> real pi() { return 3.14159265359; }
>
> Since we would hope that
>
> real x = pi;
>
> will be inlined by the compiler, it would yield the effect of a
> manifest constant! :)
>
Except you need a specific set of compiler and linker options for that effect.
(-inline, -L--gc-sections)
No way to tell the compiler that you want a specific function inlined and
omitted from output.
More information about the Digitalmars-d
mailing list