Forked from apocolipse/RawRepresentable-Equatable.swift
Created
June 25, 2018 10:14
-
-
Save ohtwo/cb08e071da7907c0247688a3d27735c0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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