From ff607e1b1829884a32bbe80d7815ddfce9b6d3bf Mon Sep 17 00:00:00 2001 From: Christopher Dykes Date: Fri, 16 Jun 2017 01:12:53 -0700 Subject: [PATCH] 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 --- folly/experimental/logging/LogLevel.h | 16 ---------------- 1 file changed, 16 deletions(-) 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. */ -- 2.34.1