You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The deprecation note says "Just call .cmp() on an Ordering" but is misleading.
16:52 < Dr-Emann> brson: If you have 2 Ords to compare to 2 other Ords, you can use (a1, b1).cmp(&(a2, b2)). If you only have 2 Orderings, you can write out the match that
lexical_ordering contains, or use (o1, o2).cmp(&(Equal, Equal)). (but that's pretty unintuitive)
16:52 < Dr-Emann> Either way, the deprecation note should be changed. (or removed. I kinda like having that as a convenience function.)
The text was updated successfully, but these errors were encountered:
Fwiw I think it was normally used like lexical_ordering(a1.cmp(&a2), b1.cmp(&b2)) where the as and bs are arbitrary Ord types. The replacement for that is (a1, b1).cmp(&(a2, b2)). (That said, the message is still unhelpful, maybe it should say "tuple" instead of "ordering".)
The deprecation note says "Just call .cmp() on an Ordering" but is misleading.
The text was updated successfully, but these errors were encountered: