From: Christopher Dykes Date: Fri, 16 Jun 2017 08:12:53 +0000 (-0700) Subject: Remove the relative comparison operators on LogLevel X-Git-Tag: v2017.06.19.00~6 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=ff607e1b1829884a32bbe80d7815ddfce9b6d3bf;p=folly.git Remove the relative comparison operators on LogLevel Summary: MSVC, GCC, and Clang define the relative comparison operators by default on `enum class` values, however under MSVC defining them explicitly causes the compiler to fail to resolve which operator to use, so just remove them entirely, as they aren't needed. Reviewed By: simpkins Differential Revision: D5259835 fbshipit-source-id: 1b91db5de0fc47320daabfdd7132ae910887ff0f --- diff --git a/folly/experimental/logging/LogLevel.h b/folly/experimental/logging/LogLevel.h index c5f19203..05c1603e 100644 --- a/folly/experimental/logging/LogLevel.h +++ b/folly/experimental/logging/LogLevel.h @@ -98,22 +98,6 @@ inline LogLevel& operator-=(LogLevel& level, uint32_t value) { return level; } -/* - * Comparisons between LogLevel values - */ -inline bool operator<=(LogLevel a, LogLevel b) { - return static_cast(a) <= static_cast(b); -} -inline bool operator<(LogLevel a, LogLevel b) { - return static_cast(a) < static_cast(b); -} -inline bool operator>=(LogLevel a, LogLevel b) { - return static_cast(a) >= static_cast(b); -} -inline bool operator>(LogLevel a, LogLevel b) { - return static_cast(a) > static_cast(b); -} - /** * Construct a LogLevel from a string name. */