www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - Segmentation fault on linux

When trying to compile

template pow(x, int n) 
{ 
 static assert(n>=0);
enum {pow = pow!(x,n % 2) * pow!(x*x,n/2)} 
} 
template pow(x,int n:1) 
{ enum {pow= x} } 
template pow(x,int n:0) 
{ enum {pow= 1} } 



int main()
{

   printf("%d\n",pow!(3,4));

}

I get 

template instance pow!(3,4) does not match any template declaration
Segmentation fault
May 30 2004