[Issue 8106] func.stringof with default args

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Jun 13 20:48:19 PDT 2012


http://d.puremagic.com/issues/show_bug.cgi?id=8106



--- Comment #7 from Walter Bright <bugzilla at digitalmars.com> 2012-06-13 20:50:27 PDT ---
Suppose I made this work:
-------------------------
template ParameterTypeTuple(alias foo)
{
    static if (is(typeof(foo) P == function))
        alias P ParameterTypeTuple;
    else
        static assert(0, "argument has no parameters");
}

int func(int i, long j = 7) { return 3; }

alias ParameterTypeTuple!func PT;

int bar(PT) { return 4; }

pragma(msg, typeof(bar));

void main()
{
    bar(1);
}
----------------------------

I.e. the default argument is propagated to the tuple. Will that work for you?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list