From 5eeeb317fccf4ba27d76e5a9c0578790a898d619 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Kr=C3=BCgler?= Date: Sat, 2 Jul 2022 18:59:49 +0200 Subject: [PATCH] #2954: Provide std::conjunction and std::disjunction substitutes --- include/fmt/core.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/include/fmt/core.h b/include/fmt/core.h index 55ae22db..cb6a8887 100644 --- a/include/fmt/core.h +++ b/include/fmt/core.h @@ -292,6 +292,32 @@ template using type_identity_t = typename type_identity::type; template using underlying_t = typename std::underlying_type::type; +template +struct disjunction; +template <> +struct disjunction<> : std::false_type {}; +template +struct disjunction

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

: P {}; +template +struct conjunction : std::conditional::type {}; +template +struct conjunction + : std::conditional, P1>::type { +}; + struct monostate { constexpr monostate() {} };