[BitSet] Make BitSet generic over its Element

This gets rid of the weird asymmetry between reading the contents of a BitSet (where we used to always get Int values) and mutating it (where we used to be able to give it values fo any fixed-width integer type).
This commit is contained in:
Károly Lőrentey committed 2022-07-30 23:25:53 -07:00
1 parent 55f3b58437
commit 1d1fbc82d4
26 files changed
+621 -389

No files matched your search

@@ -10,9 +10,9 @@
//===----------------------------------------------------------------------===//
extension BitArray {
public init(_ set: BitSet) {
public init(_ set: BitSet<Index>) {
guard let l = set.last else { self.init(); return }
self.init(_storage: set._storage, count: l + 1)
self.init(_storage: set._core._storage, count: l + 1)
}
public init<I: BinaryInteger>(bitPattern value: I) {