We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Size computation already available in evalexprs.nim.
One way to implement these rather easily:
func `[]`[T](a: set[T]; i: int): var uint8 {.magic: "AccessSetAsByteArray".} func `+`*[T](a, b: set[T]): set[T] {.inline, noinit.} = for i in 0 ..< sizeof(a): result[i] = a[i] or b[i] func `*`*[T](a, b: set[T]): set[T] {.inline, noinit.} = for i in 0 ..< sizeof(a): result[i] = a[i] and b[i] func `-`*[T](a, b: set[T]): set[T] {.inline, noinit.} = for i in 0 ..< sizeof(a): result[i] = a[i] and not b[i] func `==`*[T](a, b: set[T]): bool {.inline.} = for i in 0 ..< sizeof(a): if a[i] != b[i]: return false return true func `<=`*[T](a, b: set[T]): bool {.inline.} = for i in 0 ..< sizeof(a): if (a[i] and not b[i]) != 0: return false return true func `<`*[T](a, b: set[T]): bool = (a <= b) and not (a == b)
The text was updated successfully, but these errors were encountered:
metagn
No branches or pull requests
Size computation already available in evalexprs.nim.
One way to implement these rather easily:
The text was updated successfully, but these errors were encountered: