Avatar
Swift gives developers a way to limit the use of declarations in certain contexts using the @available attribute. For example, a library developer can specify that a new API is only available at runtime on macOS 15 or newer using @available: @available(macOS, introduced: 15) public struct Foo { /* ... */ } The compiler only accepts references ...
12:09 AM
availableで使える判定値を@availabilityDomainで定義できる boolかバージョンタプルが使える
12:10 AM
もちろんコンパイル時定数でなけらばならないらしい