Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ohtwo/cb08e071da7907c0247688a3d27735c0 to your computer and use it in GitHub Desktop.
Save ohtwo/cb08e071da7907c0247688a3d27735c0 to your computer and use it in GitHub Desktop.
func ==<U: Equatable, T: protocol<RawRepresentable, Equatable> where T.RawValue == U>(lhs: U, rhs: T) -> Bool {
return lhs == rhs.rawValue
}
func !=<U: Equatable, T: protocol<RawRepresentable, Equatable> where T.RawValue == U>(lhs: U, rhs: T) -> Bool {
return lhs != rhs.rawValue
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment