#ifndef RFL_FROM_NAMED_TUPLE_HPP_ #define RFL_FROM_NAMED_TUPLE_HPP_ #include #include "internal/copy_from_named_tuple.hpp" #include "internal/move_from_named_tuple.hpp" namespace rfl { /// Generates the struct T from a named tuple. template T from_named_tuple(NamedTupleType&& _n) { if constexpr (std::is_lvalue_reference{}) { return internal::copy_from_named_tuple(_n); } else { return internal::move_from_named_tuple(_n); } } /// Generates the struct T from a named tuple. template T from_named_tuple(const NamedTupleType& _n) { return internal::copy_from_named_tuple(_n); } } // namespace rfl #endif