#ifndef RFL_INTERNAL_GETMETAFIELDS_HPP_ #define RFL_INTERNAL_GETMETAFIELDS_HPP_ #include #include #include #include "../MetaField.hpp" #include "../type_name_t.hpp" namespace rfl { namespace internal { template auto get_meta_fields(AlreadyExtracted&&... _already_extracted) { constexpr size_t i = sizeof...(_already_extracted); if constexpr (NamedTupleType::size() == i) { return std::array{std::move(_already_extracted)...}; } else { using FieldType = std::tuple_element_t; auto name = typename FieldType::Name().str(); auto type = type_name_t().str(); return get_meta_fields( std::move(_already_extracted)..., MetaField(std::move(name), std::move(type))); } } } // namespace internal } // namespace rfl #endif