std.mixins
Philippe Sigaud
philippe.sigaud at gmail.com
Wed Sep 1 12:54:00 PDT 2010
On Wed, Sep 1, 2010 at 21:47, Torarin <torarind at gmail.com> wrote:
> It says: "If a.fun(b, c, d) is seen but fun is not a member of a's
> type, D rewrites that as fun(a, b, c, d) and tries that as well."
> So I guess it's possible it won't work with numerical types because
> they can never have members.
>
>
I just tried this:
int i;
writeln(i.max); // writes int.max !
So it seems you can access the type properties through a value of that type.
Man, I learnt two new things in two minutes...
Philippe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20100901/24c28c9f/attachment.html>
More information about the Digitalmars-d
mailing list