rfl::UnderlyingEnums (#186)

* First part

* Plural

* Update rfl.hpp

* Documentation

* Update rfl.hpp

* Update processors.md

* underlying_enums test

* Update Parser_default.hpp

* Fix typo in test
This commit is contained in:
AnsiV01
2024-09-12 09:37:31 +02:00
committed by GitHub
parent 7274a2eb47
commit dfc24ad932
7 changed files with 124 additions and 7 deletions
+6
View File
@@ -5,6 +5,7 @@
#include "internal/is_no_field_names_v.hpp"
#include "internal/is_no_optionals_v.hpp"
#include "internal/is_underlying_enums_v.hpp"
namespace rfl {
@@ -15,6 +16,7 @@ template <>
struct Processors<> {
static constexpr bool all_required_ = false;
static constexpr bool no_field_names_ = false;
static constexpr bool underlying_enums_ = false;
template <class T, class NamedTupleType>
static auto process(NamedTupleType&& _named_tuple) {
@@ -32,6 +34,10 @@ struct Processors<Head, Tail...> {
std::disjunction_v<internal::is_no_field_names<Head>,
internal::is_no_field_names<Tail>...>;
static constexpr bool underlying_enums_ =
std::disjunction_v<internal::is_underlying_enums<Head>,
internal::is_underlying_enums<Tail>...>;
template <class T, class NamedTupleType>
static auto process(NamedTupleType&& _named_tuple) {
return Processors<Tail...>::template process<T>(