#ifndef RFL_NAMED_TUPLE_T_HPP_ #define RFL_NAMED_TUPLE_T_HPP_ #include #include #include #include "NamedTuple.hpp" #include "internal/is_named_tuple.hpp" #include "internal/ptr_named_tuple_t.hpp" #include "internal/wrap_in_rfl_array_t.hpp" #include "to_named_tuple.hpp" namespace rfl { template struct remove_ptr; template struct remove_ptr> { using FieldType = Field<_name, internal::wrap_in_rfl_array_t< std::remove_cvref_t>>>; }; template struct remove_ptrs_nt; template struct remove_ptrs_nt> { using NamedTupleType = NamedTuple::FieldType...>; }; /// Generates the named tuple that is equivalent to the struct T. /// This is the result you would expect from calling /// to_named_tuple(my_struct). All fields of the struct must be an rfl::Field. template using named_tuple_t = typename remove_ptrs_nt>::NamedTupleType; } // namespace rfl #endif