Convert a signed comparison value into the matching ordering.
Declared in <folly/lang/Ordering.h>
template<typename T>
constexpr
ordering
to_ordering(T c);
ordering::lt, ordering::eq, or ordering::gt according to the sign of c.
| Name | Description |
|---|---|
| c | A value comparable against T(0), such as the result of a three-way comparison or memcmp. |