From 38d7045685d4904d013ea4990a3aa7f5e78309cf Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 22 Oct 2022 17:57:47 +0100 Subject: Add magic support to printing/parsing/validating enumerations --- test/enumDetailsData.hpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 test/enumDetailsData.hpp (limited to 'test/enumDetailsData.hpp') 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 + +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 { + // Any ordered integer_sequence which includes all enumeration values + using Vs = std::integer_sequence; +}; -- cgit v1.2.3