Extremely ugly hack, but seems to work:
    
    
    template hasCustomStrImpl(x): bool =
      `not`: compiles:
        proc `$`(_: typeof(x)): string = ""
        discard $x
    
    
    Run

Reply via email to