Skip to content

Instantly share code, notes, and snippets.

@apocolipse
Created June 22, 2016 22:39
Show Gist options
  • Save apocolipse/1b3f5c1ba70148b5d0d62af8a93be438 to your computer and use it in GitHub Desktop.
Save apocolipse/1b3f5c1ba70148b5d0d62af8a93be438 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