Этот код, используемый для построения битового шаблона из массива битов, дает мне ошибку в Xcode 9 (работает в 8.3.3)
@_specialize(UInt8)
func integerFrom<T: UnsignedInteger>(_ bits: Array<Bit>) -> T {
var bitPattern: T = 0
for idx in bits.indices {
if bits[idx] == Bit.one {
let bit = T(UIntMax(1) << UIntMax(idx))
bitPattern = bitPattern | bit
}
}
return bitPattern
}
Ошибка
Неизвестный параметр UInt8 в атрибуте _specialize.
Любые выводы/предложения по этому поводу?
@_specialize(where T == UInt8)
- person Marcin   schedule 20.09.2017