Type value

Zhenya zheny at list.ru
Mon Dec 10 23:15:37 PST 2012


I'm sorry for my english.
I know that D != Python and my example don't need
any RTTI.

D has alias this feature.My example shows that we can use alias 
this with types.
And I just want use this:

struct Type(T)
{
    alias T m_type;
    alias m_type this;
}

int main()
{
    Type!int Int;
    Int i;//should compile by definition of alias this
}


More information about the Digitalmars-d-learn mailing list