summaryrefslogtreecommitdiff
path: root/src/mongo/db/s/resharding/resharding_metrics_helpers.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/s/resharding/resharding_metrics_helpers.h')
-rw-r--r--src/mongo/db/s/resharding/resharding_metrics_helpers.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/mongo/db/s/resharding/resharding_metrics_helpers.h b/src/mongo/db/s/resharding/resharding_metrics_helpers.h
index d5450d12135..42d8fc01fd0 100644
--- a/src/mongo/db/s/resharding/resharding_metrics_helpers.h
+++ b/src/mongo/db/s/resharding/resharding_metrics_helpers.h
@@ -41,10 +41,14 @@ namespace resharding_metrics {
template <class T>
inline constexpr bool isStateDocument =
- std::disjunction<std::is_same<T, ReshardingRecipientDocument>,
- std::is_same<T, ReshardingCoordinatorDocument>,
- std::is_same<T, ReshardingDonorDocument>>::value;
+ std::disjunction_v<std::is_same<T, ReshardingRecipientDocument>,
+ std::is_same<T, ReshardingCoordinatorDocument>,
+ std::is_same<T, ReshardingDonorDocument>>;
+template <typename T>
+inline constexpr bool isState = std::disjunction_v<std::is_same<T, RecipientStateEnum>,
+ std::is_same<T, CoordinatorStateEnum>,
+ std::is_same<T, DonorStateEnum>>;
template <typename T>
inline constexpr auto getState(const T& document) {