summaryrefslogtreecommitdiff
path: root/src/mongo/platform
diff options
context:
space:
mode:
authorADAM David Alan Martin <adam.martin@10gen.com>2019-07-27 10:52:46 -0400
committerADAM David Alan Martin <adam.martin@10gen.com>2019-07-27 11:13:28 -0400
commitca57a4d640aee04ef373a50b24e79d85f0bb91a0 (patch)
tree12e465b472499631f7b2bd4ad7a1084b41ec2404 /src/mongo/platform
parent134a4083953270e8a11430395357fb70a29047ad (diff)
downloadmongo-ca57a4d640aee04ef373a50b24e79d85f0bb91a0.tar.gz
SERVER-40160 Remove `if_constexpr.h` header.
This header circumvented bad formatting which `clang-format-3.8` imparted to `if constexpr`. Now `clang-format-7.0.1` imparts a reasonable format to `if constexpr` so this header is not needed anymore.
Diffstat (limited to 'src/mongo/platform')
-rw-r--r--src/mongo/platform/decimal128.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/mongo/platform/decimal128.h b/src/mongo/platform/decimal128.h
index c2f0149a73e..6ad7b21bb3e 100644
--- a/src/mongo/platform/decimal128.h
+++ b/src/mongo/platform/decimal128.h
@@ -40,7 +40,6 @@
#include "mongo/config.h"
#include "mongo/util/assert_util.h"
-#include "mongo/util/if_constexpr.h"
namespace mongo {
@@ -580,7 +579,7 @@ private:
// The absolute value of constexpr `i` as a uint64_t, avoiding warnings.
template <typename T>
constexpr std::uint64_t _makeCoefficientLow(T i) {
- IF_CONSTEXPR(std::is_signed_v<T>) {
+ if constexpr (std::is_signed_v<T>) {
if (i < 0) {
std::make_unsigned_t<T> ui = i;
ui = ~ui + 1; // Negation, without MSVC C4146.
@@ -588,8 +587,7 @@ private:
} else {
return static_cast<std::uint64_t>(i);
}
- }
- else {
+ } else {
return static_cast<std::uint64_t>(i);
}
}