I have a template like so:

template SIMD(width:untyped,body:untyped) =

and I'd like to make a template like this;
    
    
    template simdFor[T](a:openarray[T], body:untyped) =
        for i in countup(0,a.len,width): #etc
    

where the second template depends on the width variable from the first template 
existing. Is something like this possible? I tried this directly and get 
strange errors, which I suspect may just mean you can't have templates in 
templates. 

Reply via email to