On Saturday, 16 January 2016 at 21:22:15 UTC, data pulverizer wrote:
Is it possible to create a function that returns Type like typeof() does? Something such as:

Type returnInt(){
    return int;
}

No. A function cannot return a type. A template can evaluate to a type, though:

----
template returnInt(){
    alias returnInt = int;
}
----

More to the point what is the Type of a type such as int?

Types don't have types. You can check if something is a type with an IsExpression: `is(T)` is true if T is a type.

Reply via email to