1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
#ifndef RFL_INTERNAL_TUPLE_MAKE_FROM_TUPLE_HPP_
#define RFL_INTERNAL_TUPLE_MAKE_FROM_TUPLE_HPP_
#include <utility>
#include "../../Tuple.hpp"
namespace rfl::internal::tuple {
template <class T, class... Types, int... _is>
T make_from_tuple(const rfl::Tuple<Types...>& _t1,
std::integer_sequence<int, _is...>) {
return T{rfl::get<_is>(_t1)...};
}
template <class T, class... Types, int... _is>
T make_from_tuple(rfl::Tuple<Types...>&& _t1,
std::integer_sequence<int, _is...>) {
return T{std::move(rfl::get<_is>(_t1))...};
}
} // namespace rfl::internal::tuple
#endif
|