It's called the same way, `N` is taken from the object itself.
    
    
    type
      Object[size: static[int]] = object
        list0 : array[size, int]
        list1 : array[size, string]
        list2 : array[size, float]
    
    var o: Object[2]
    echo o.size
    
    proc size1[N](x: Object[N]): int = N
    echo o.size1
    
    template size2[N](x: Object[N]): int = N
    echo o.size2
    
    
    Run

Reply via email to