Avatar
swift-4.1-DEVELOPMENT-SNAPSHOT-2017-12-04-aはConditional Conformanceのビルド通るね。 struct Box<T> { let value: T } extension Box: Equatable where T: Equatable { static func == (lhs: Box, rhs: Box) -> Bool { return lhs.value == rhs.value } } Box(value: 1) == Box(value: 2) Playground execution failed: error: PlayNow-20171205.playground:7:15: error: ambiguous use of operator '==' Box(value: 1) == Box(value: 2) ^ PlayNow-20171205.playground:2:17: note: found this candidate static func == (lhs: Box, rhs: Box) -> Bool { ^ 使えそうには無いけど。