#ifndef RFL_INTERNAL_DEFINENAMEDTUPLE_HPP_ #define RFL_INTERNAL_DEFINENAMEDTUPLE_HPP_ #include "../NamedTuple.hpp" namespace rfl { namespace internal { template struct define_named_tuple; /// Allows you to combine several named tuples and/or additional fields. /// Recursive case - all types are fields. template struct define_named_tuple { using type = typename define_named_tuple, Tail...>::type; }; /// Allows you to combine several named tuples and/or additional fields. /// Recursive case - first type is NamedTuple, second type is field. template struct define_named_tuple, Head, Tail...> { using type = typename define_named_tuple, Tail...>::type; }; /// Allows you to combine several named tuples and/or additional fields. /// Recursive case - first type is NamedTuple, second type is also /// NamedTuple. template struct define_named_tuple, NamedTuple, Tail...> { using type = typename define_named_tuple, Tail...>::type; }; /// Allows you to combine several named tuples and/or additional fields. template struct define_named_tuple> { using type = NamedTuple; }; } // namespace internal } // namespace rfl #endif