From 6eab289ac11fd55e742ca1c1ad46ea233ceeee3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Kr=C3=BCgler?= Date: Sun, 3 Jul 2022 18:22:51 +0200 Subject: [PATCH] Provide simplified implementations of conjunction and disjunction --- include/fmt/core.h | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/include/fmt/core.h b/include/fmt/core.h index cb6a8887..97b55d19 100644 --- a/include/fmt/core.h +++ b/include/fmt/core.h @@ -293,29 +293,21 @@ template using underlying_t = typename std::underlying_type::type; template -struct disjunction; -template <> -struct disjunction<> : std::false_type {}; +struct disjunction : std::false_type {}; template struct disjunction

: P {}; -template -struct disjunction : std::conditional::type {}; -template -struct disjunction - : std::conditional>::type { +template +struct disjunction + : conditional_t> { }; template -struct conjunction; -template <> -struct conjunction<> : std::true_type {}; +struct conjunction : std::true_type {}; template struct conjunction

: P {}; -template -struct conjunction : std::conditional::type {}; -template -struct conjunction - : std::conditional, P1>::type { +template +struct conjunction + : conditional_t, P1> { }; struct monostate {