mirror of
https://codeberg.org/DawnMagnet/reflect-cpp
synced 2026-12-06 02:36:18 +08:00
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:
@@ -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>(
|
||||
|
||||
Reference in New Issue
Block a user