Type value

Zhenya zheny at list.ru
Mon Dec 10 11:54:45 PST 2012


Hi!
In some previous post I asked about possibility of declar 
opIndex,that return type.
I thoght about it,and I understood that code like this is legal:

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

void main()
{
	Type!int Int;
//	Int a;
}

Is it hard to implement possibility of using Int as a type?
It would allow functions,that return types:)


More information about the Digitalmars-d-learn mailing list