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:
Steve (Numerics) Canon committed 2021-02-19 15:53:15 -05:00
1 parent 105b59b8a4
commit 97852afaf5
5 files changed
+188 -19

No files matched your search

+2 -2
View File
@@ -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