From 7e7e46c7d46881f9ab36cc8234ba633c1aaaf9e8 Mon Sep 17 00:00:00 2001 From: "matthias@arch" Date: Tue, 1 Nov 2022 18:17:43 +0100 Subject: [PATCH] Added useful concepts --- src/concepts.hpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 src/concepts.hpp diff --git a/src/concepts.hpp b/src/concepts.hpp new file mode 100644 index 0000000..f809800 --- /dev/null +++ b/src/concepts.hpp @@ -0,0 +1,22 @@ +#pragma once + +#include +#include + +namespace gz::util { + /// Satisfied when T is in PackTypes + template + concept IsInPack = (std::same_as || ...); + + template + concept False = false; + + /// Forward range holding integers + template + concept IntegralForwardRange = std::ranges::forward_range and std::integral>; +} + +/** + * @file + * @brief Concepts that might be useful elsewhere + */