summaryrefslogtreecommitdiff
path: root/src/mongo/base
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/base
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/base')
-rw-r--r--src/mongo/base/parse_number_test.cpp1
-rw-r--r--src/mongo/base/unwind_test.cpp6
2 files changed, 2 insertions, 5 deletions
diff --git a/src/mongo/base/parse_number_test.cpp b/src/mongo/base/parse_number_test.cpp
index 577f2c3b38d..dff4e2fc9f6 100644
--- a/src/mongo/base/parse_number_test.cpp
+++ b/src/mongo/base/parse_number_test.cpp
@@ -39,7 +39,6 @@
#include "mongo/base/parse_number.h"
#include "mongo/base/status.h"
#include "mongo/unittest/unittest.h"
-#include "mongo/util/if_constexpr.h"
#include "mongo/util/str.h" // for str::stream()!
#define ASSERT_PARSES_WITH_PARSER(type, input_string, parser, expected_value) \
diff --git a/src/mongo/base/unwind_test.cpp b/src/mongo/base/unwind_test.cpp
index 7b2e5129d5f..292c20076a4 100644
--- a/src/mongo/base/unwind_test.cpp
+++ b/src/mongo/base/unwind_test.cpp
@@ -42,7 +42,6 @@
#include "mongo/base/backtrace_visibility_test.h"
#include "mongo/unittest/unittest.h"
-#include "mongo/util/if_constexpr.h"
#include "mongo/util/stacktrace.h"
namespace mongo {
@@ -98,10 +97,9 @@ struct Context {
// Disable clang-format for the "if constexpr"
template <int N>
void callNext(Context& ctx) {
- IF_CONSTEXPR(N == 0) {
+ if constexpr (N == 0) {
ctx.s = trace();
- }
- else {
+ } else {
ctx.plan[N - 1](ctx);
}