mirror of
https://github.com/apple/swift-numerics
synced 2026-11-27 05:04:26 +00:00
Adjust Float16 availability for Swift 5.4 toolchains.
In older toolchains, Float16 is marked unavailable on all mac targets; starting with the 5.4 toolchain, it is available starting in macOS 11.0 when targeting Apple Silicon.
This commit is contained in:
1 parent
105b59b8a4
commit
97852afaf5
5 files changed
+188
-19
No files matched your search
@@ -15,8 +15,8 @@ public protocol FixedWidthFloatingPoint: BinaryFloatingPoint
|
||||
where Exponent: FixedWidthInteger,
|
||||
RawSignificand: FixedWidthInteger { }
|
||||
|
||||
#if swift(>=5.3) && !(os(macOS) || os(iOS) && targetEnvironment(macCatalyst))
|
||||
@available(iOS 14.0, watchOS 14.0, tvOS 7.0, *)
|
||||
#if swift(>=5.4) && !((os(macOS) || targetEnvironment(macCatalyst)) && arch(x86_64))
|
||||
@available(macOS 11.0, iOS 14.0, watchOS 14.0, tvOS 7.0, *)
|
||||
extension Float16: FixedWidthFloatingPoint { }
|
||||
#endif
|
||||
|
||||
|
||||
Reference in new issue
Block a user