type
      RingBuffer*[N: static[int],T] = ref object #N=size, T=type
        buf: array[N,T]
        head, tail: int
    proc add*[N, static[int],T](self: var RingBuffer[N,T], data: T) =
      # some stuff
    

and I don't think you need ref object for your use case.

Reply via email to