diff --git a/src/base/refl/auto_accessor.h b/src/base/refl/auto_accessor.h index bc4527330..9e90a9f89 100644 --- a/src/base/refl/auto_accessor.h +++ b/src/base/refl/auto_accessor.h @@ -104,14 +104,14 @@ constexpr std::pair> #endif }; +template +using IsSerializableT = std::bool_constant>; + template () - { - return IsSerializable; - }>)> + std::remove_cvref_t< + decltype(all_member_functor_v)> #else std::tuple<> #endif diff --git a/src/base/refl/auto_struct.h b/src/base/refl/auto_struct.h index 998890891..cb327cb73 100644 --- a/src/base/refl/auto_struct.h +++ b/src/base/refl/auto_struct.h @@ -679,31 +679,24 @@ concept is_reflectable = || (std::is_aggregate_v && is_structure_bindable_v != structure_bindable::no); -template +template class Checker, class... PreMPs> constexpr static auto all_member_functor_v{ [](std::tuple *, std::tuple) { - if constexpr (L.template operator()()) { + if constexpr (Checker::value) { return std::tuple>{}; } else if constexpr (is_reflectable) { return decltype(std::tuple_cat( - all_member_functor_v..., + all_member_functor_v..., all_member_functor_v, - L, + Checker, PreMPs..., MF>...)){}; } }(std::add_pointer_t>{}, member_functors_v)}; -template -constexpr static std::tuple> - all_member_functor_v()>, - PreMPs...>{}; - namespace Functors { namespace Composite