         let codingKey = _DictionaryCodingKey(intValue: key as! Int)
         try container.encode(value, forKey: codingKey)
       }
-    } else if #available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *),
+    } else if #available(SwiftStdlib 5.6, *),
               Key.self is CodingKeyRepresentable.Type {
       // Since the keys are CodingKeyRepresentable, we can use the `codingKey`
       // to create `_DictionaryCodingKey` instances.

  /// Encodes the contents of this dictionary into the given encoder.
  ///
  /// If the dictionary uses keys that are `String`, `Int`, or a type conforming
  /// to `CodingKeyRepresentable`, the contents are encoded in a keyed container.
  /// Otherwise, the contents are encoded as alternating key-value pairs in an
  /// unkeyed container.
  ///
  /// This function throws an error if any values are invalid for the given
  /// encoder's format.

/// and decoding `Dictionary` values keyed by the conforming type to and from
/// a keyed container, rather than encoding and decoding the dictionary as an
/// unkeyed container of alternating key-value pairs.
@available(SwiftStdlib 5.6, *)
public protocol CodingKeyRepresentable {
  @available(SwiftStdlib 5.6, *)
  var codingKey: CodingKey { get }
  @available(SwiftStdlib 5.6, *)
  init?<T: CodingKey>(codingKey: T)
}

@available(SwiftStdlib 5.6, *)
extension RawRepresentable
where Self: CodingKeyRepresentable, RawValue == String {
  @available(SwiftStdlib 5.6, *)
  public var codingKey: CodingKey {
    _DictionaryCodingKey(stringValue: rawValue)
  }
  @available(SwiftStdlib 5.6, *)
  public init?<T: CodingKey>(codingKey: T) {
    self.init(rawValue: codingKey.stringValue)
  }
}

@available(SwiftStdlib 5.6, *)
extension RawRepresentable where Self: CodingKeyRepresentable, RawValue == Int {
  @available(SwiftStdlib 5.6, *)
  public var codingKey: CodingKey {
    _DictionaryCodingKey(intValue: rawValue)
  }
  @available(SwiftStdlib 5.6, *)
  public init?<T: CodingKey>(codingKey: T) {
    if let intValue = codingKey.intValue {
      self.init(rawValue: intValue)
