On Sunday, 21 August 2016 at 21:21:22 UTC, Engine Machine wrote:
Well, I see that a template with 0 parameters can act as a "type", if you will.

Just like functions

void foo(T)(T x)

acts like a normal function foo(3) even though it is a templated function.

In fact, I see very little difference between a template with 0 parameters and a type.

Type!() = Type

I think this is a very bad idea theory-wise, if not in practice as well. A template is a type constructor, not a type. They are two very different things. You can get the size of a type, its members, etc. while you cannot for a template.


Reply via email to