Releases: wltrup/Swift-WTUniquePrimitiveType
Type-safe counts, array indices, and array subscripting
-
Added the ability for any
UniqueIntegerType
-conforming type to initialise itself with anInt
and to retrieve the underlying value as anInt
. The result for either operation is nil when the operation can't be performed. -
Added
TypesafeIntegerIndexType
. -
Added
TypesafeCountType
. -
Added support for returning
TypesafeCountType
instances when querying the size of anArray
,Set
, orDictionary
. -
Added support for
Array
subscripting usingTypesafeIntegerIndexType
instances. -
Added missing support for hashing a
Dictionary
. -
Streamlined and made the code more homogeneous between the various protocols and their extensions, for ease of reading and understanding.
Support for boolean operators
This release adds automatic support for !
, &&
, and ||
operators to any type conforming to UniqueBooleanType
.
Initial release
1.0.0