Why __traits(compile,...) fails here?

Philippe Sigaud philippe.sigaud at gmail.com
Wed Aug 8 08:58:30 PDT 2012


On Wed, Aug 8, 2012 at 11:13 AM, Timon Gehr <timon.gehr at gmx.ch> wrote:

> Yes, but note that this distinction does not make any sense.
>
> alias int Int; // works
>
> isType!Int // 'Int' is clearly a symbol, yet the instantiation fails.
>
> alias declarations should just accept built-in types. If someone for
> some obscure reason needs to exclude them, template constraints are
> good enough. There is no reason to make built-in types behave specially
> here.

Yes, alias has different semantics depending on its use (in template
param list or as a statement).


More information about the Digitalmars-d-learn mailing list