After speaking with the current owner of Measurement, the most sensible path is to at runtime verifty the conformance of Units to a specific dimension since we cannot directly check at compile time. If at a future point in time a more specific comparitor can be added that can restrict the comparison to measurements in a specific dimension without causing equatable failures we may want to revisit this. However as it stands this preserves the most reasonable implementation of comparison of disperate measurement unit types while preserving the expected logic of conversions within that dimension.
The default implementation for comparable automatically adds >, >= etc by having == and < defined. Also the dynamic check for comparison of measurements that are convertible should traverse through the same runtime equality check instead of a static dispatch call out.
This resolves:
<rdar://problem/27556581> Measurement type defines two '==' functions
All generic bridgeable types can bridge for all their instantiations now. Removing this ferrets out some now-unnecessary traps that check for unbridgeable parameter types.
Foundation provides a number of specific operators defined in the
global scope. Push all of these into their corresponding types. This
cleanup helps verify that the SE-0091 implementation is generally
functional.
Due to current language limitations (26607639), MeasurementFormatter's
stringFromMeasurement: is esentially useless when imported into Swift.
This workaround allows it to work as expected.
<rdar://problem/27173952> Workaround: MeasurementFormatter.string(from:
Measurement<Unit>) doesn't recognize subclasses of Unit