It's [typeinfo](https://nim-lang.org/docs/typeinfo.html) not typetraits and 
instead of `auto` you'd need to use the `Any` type. I recommend you don't use 
this module and simplify your code to not use types at runtime. Do note that if 
you want to check at compile time all you need to do is use `when`.
    
    
    proc myProc[T](a: T) =
      when T is int:
        echo "int: ", a
      elif T is string:
        echo "string: ", a
    
    
    Run

which you can just turn into overloads since you can't use dynamic dispatch.
    
    
    proc myProc(a: int) =
      echo "int: ", a
    
    proc myProc(a: string) =
      echo "string: ", a
    
    
    Run

Reply via email to