basic types and alias

Walter Bright newshound2 at
Sun Feb 12 12:44:22 PST 2012

On 2/12/2012 11:27 AM, Timon Gehr wrote:
> alias int I; // OK
> template T(alias I){}
> mixin T!int; // NG
> Is there any reason why we should not get rid of this inconsistency as fast as
> possible? What does not accepting basic types as template alias parameters buy
> anyone?

alias parameters accept symbols. Keywords are not symbols. To pass a type, just 
use template T(I).

More information about the Digitalmars-d mailing list