Files
Emily Boudreaux ec13264050 feat(reflect-cpp): Switched from glaze -> reflect cpp
A bug was discovered in glaze which prevented valid toml output. We have
switched to toml++ and reflect-cpp. The interface has remained the same
so this should not break any code
2025-12-06 10:55:46 -05:00

31 lines
771 B
C++

#ifndef RFL_INTERNAL_TUPLE_APPLY_HPP_
#define RFL_INTERNAL_TUPLE_APPLY_HPP_
#include <utility>
#include "../../Tuple.hpp"
namespace rfl::internal::tuple {
template <class F, class... Types, int... _is>
auto apply(F&& _f, const rfl::Tuple<Types...>& _tup,
std::integer_sequence<int, _is...>) {
return _f(rfl::get<_is>(_tup)...);
}
template <class F, class... Types, int... _is>
auto apply(F&& _f, rfl::Tuple<Types...>& _tup,
std::integer_sequence<int, _is...>) {
return _f(rfl::get<_is>(_tup)...);
}
template <class F, class... Types, int... _is>
auto apply(F&& _f, rfl::Tuple<Types...>&& _tup,
std::integer_sequence<int, _is...>) {
return _f(std::move(rfl::get<_is>(_tup))...);
}
} // namespace rfl::internal::tuple
#endif