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


Andrej Mitrovic <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]


--- Comment #1 from Andrej Mitrovic <[email protected]> 2013-01-22 
19:37:08 PST ---
Well there is now __parameters, but this gives out both the types, param names,
and default values:

void test(int x, int y = 1) { }

template ParameterTuple(alias func)
{
    static if(is(typeof(func) P == __parameters))
        alias P ParameterTuple;
    else
        static assert(0);
}

void main()
{
    pragma(msg, ParameterTuple!test);
}

> (int x, int y = 1)

I would personally like to wrap ParameterTypeTuple, ParameterStorageClassTuple,
and provide a single GetParameters template which would return a tuple of these
struct objects:

struct Parameter(Type, alias DefVal)
{
    ParameterStorageClass stc;
    Type type;
    string name;
    alias DefVal defaultValue;
}

It's questionable how doable this is but it would make the API easier to use.

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

Reply via email to