Not getting expected behavior from compile-time conditional

Ali Çehreli via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Jan 26 16:17:18 PST 2016


On 01/26/2016 04:12 PM, pineapple wrote:
 > Here's a simple programming showing where I'm tripping up -
 >
 > void test(T)(in T value){
 >      import std.traits;
 >      static if(is(T == char)){
 >          writeln("char");
 >      }else static if(is(isNumeric!(T))){

Remove the extra is: :)

     }else static if(isNumeric!(T)){

Ali



More information about the Digitalmars-d-learn mailing list