About template template arguments syntax
    Timon Gehr 
    timon.gehr at gmx.ch
       
    Sun Oct  2 12:19:43 PDT 2011
    
    
  
On 10/02/2011 08:48 PM, Philippe Sigaud wrote:
> On Sun, Oct 2, 2011 at 19:12, Timon Gehr<timon.gehr at gmx.ch>  wrote:
>
>> Types are symbols, so just using alias template arguments works.
>
> Hmm, no.
>
>
> template isSymbol(alias a)
> {
>      enum isSymbol = true;
> }
>
> void main()
> {
>      enum a = isSymbol!int;
> }
>
> Error: template instance isSymbol!(int) does not match template
> declaration isSymbol(alias a)
template isSymbol(alias T){
     enum isSymbol=true;
}
template ID(T){alias T x;}
void main(){
     bool mooh=isSymbol!(ID!int);
}
Well, that should be fixed.
    
    
More information about the Digitalmars-d-learn
mailing list