summaryrefslogtreecommitdiff
path: root/test/enumDetailsData.hpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2022-10-22 17:57:47 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2022-10-22 17:57:47 +0100
commit38d7045685d4904d013ea4990a3aa7f5e78309cf (patch)
tree60915147de5e37dc4a3fab39408b6abbfc49ce09 /test/enumDetailsData.hpp
parentAdd free extend builder with placeholder network support (diff)
downloadilt-38d7045685d4904d013ea4990a3aa7f5e78309cf.tar.bz2
ilt-38d7045685d4904d013ea4990a3aa7f5e78309cf.tar.xz
ilt-38d7045685d4904d013ea4990a3aa7f5e78309cf.zip
Add magic support to printing/parsing/validating enumerations
Diffstat (limited to 'test/enumDetailsData.hpp')
-rw-r--r--test/enumDetailsData.hpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/enumDetailsData.hpp b/test/enumDetailsData.hpp
new file mode 100644
index 0000000..0e98af5
--- /dev/null
+++ b/test/enumDetailsData.hpp
@@ -0,0 +1,20 @@
+#pragma once
+#include <enumDetails.hpp>
+
+enum GlobalUnscoped { aa, b, c };
+enum class GlobalScoped { aa, b, c };
+namespace ns {
+ enum Unscoped { aa, b, c };
+ enum class Scoped { aa, b, c };
+}
+namespace test1 {
+ enum class DefaultDense { a, bee, ci, de };
+}
+namespace test2 {
+ enum class NumberedSparse { a = 0, bee = 3, ci = -20, de = 100 };
+}
+
+template<> struct EnumValueCollection<test2::NumberedSparse> {
+ // Any ordered integer_sequence which includes all enumeration values
+ using Vs = std::integer_sequence<int, -100, -20, 0, 3, 10, 100, 1000>;
+};