More workarounds for #5098
This commit is contained in:
parent
57c4e78bcc
commit
54cbe0b743
3 changed files with 11 additions and 3 deletions
|
|
@ -154,7 +154,10 @@ proc add*[T](q: var Queue[T], item: T) =
|
|||
q.data[q.wr] = item
|
||||
q.wr = (q.wr + 1) and q.mask
|
||||
|
||||
proc default[T](t: typedesc[T]): T {.inline.} = discard
|
||||
template default[T](t: typedesc[T]): T =
|
||||
var v: T
|
||||
v
|
||||
|
||||
proc pop*[T](q: var Queue[T]): T {.inline, discardable.} =
|
||||
## Remove and returns the first (oldest) element of the queue `q`.
|
||||
emptyCheck(q)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue