DO NOT INCLUDE THIS MODULE!
This module is intended to only be used internally by trackerboy modules.
Miscellaneous utilities.
Procs
func deepEquals[T](a, b: ref T): bool
-
Deep equality test for two refs. Returns true if either:
- they are both nil
- they are not both nil and their referenced data is equivalent
Example:
var a, b: ref int assert a.deepEquals(b) # both are nil a = new(int) b = new(int) a[] = 2 b[] = 3 assert not a.deepEquals(b) # both are not nil, but the referenced data are not the same b[] = a[] assert a.deepEquals(b) # both are not nil and the referenced data are the same b = nil assert not a.deepEquals(b) # one of the refs is nil
Source Edit
Templates
template defaultInit(): untyped
- Alias for discard, to indicate that default initialization is intended. Source Edit