[Issue 1839] New: Give D a modern varargs system that allows forwarding

Janice Caron caron800 at googlemail.com
Thu Feb 14 23:24:27 PST 2008


On 15/02/2008, d-bugmail at puremagic.com <d-bugmail at puremagic.com> wrote:
>  That D --  a supposedly modern, easy-to-use languages -- can't do this
>  conceptually simple thing is sad.

Will this not work?

    import std.traits;

    ReturnType!(f) wraps(alias f)(ParameterTypeTuple!(f) t)
    {
        pre_call();
        ReturnType!(f) x = f(t);
        post_call();
        return x;
    }

    wrap!(A)(params);


More information about the Digitalmars-d-bugs mailing list