stdlib: use system.default if it exists
This commit is contained in:
parent
142a2d3551
commit
aed8766e84
2 changed files with 10 additions and 12 deletions
|
|
@ -116,9 +116,10 @@ template hasKeyOrPutImpl(enlarge) {.dirty.} =
|
|||
maybeRehashPutImpl(enlarge)
|
||||
else: result = true
|
||||
|
||||
template default[T](t: typedesc[T]): T =
|
||||
var v: T
|
||||
v
|
||||
when not defined(nimHasDefault):
|
||||
template default[T](t: typedesc[T]): T =
|
||||
var v: T
|
||||
v
|
||||
|
||||
template delImplIdx(t, i) =
|
||||
let msk = maxHash(t)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue