implements 'export' feature

This commit is contained in:
Araq 2012-12-01 19:10:47 +01:00
commit c98e3d2c27
10 changed files with 137 additions and 40 deletions

View file

@ -190,6 +190,11 @@ proc `$`*(s: TIntSet): string =
## The `$` operator for int sets.
dollarImpl()
proc empty*(s: TIntSet): bool {.inline.} =
## returns true if `s` is empty. This is safe to call even before
## the set has been initialized with `initIntSet`.
result = s.counter == 0
when isMainModule:
var x = initIntSet()
x.incl(1)