#ifndef RFL_GET_HPP_ #define RFL_GET_HPP_ #include "internal/Getter.hpp" #include "internal/StringLiteral.hpp" namespace rfl { /// Gets a field by index. template inline auto& get(NamedTupleType& _tup) { return internal::Getter::template get<_index>(_tup); } /// Gets a field by name. template inline auto& get(NamedTupleType& _tup) { return internal::Getter::template get<_field_name>(_tup); } /// Gets a field by the field type. template inline auto& get(NamedTupleType& _tup) { return internal::Getter::template get(_tup); } /// Gets a field by index. template inline const auto& get(const NamedTupleType& _tup) { return internal::Getter::template get_const<_index>(_tup); } /// Gets a field by name. template inline const auto& get(const NamedTupleType& _tup) { return internal::Getter::template get_const<_field_name>(_tup); } /// Gets a field by the field type. template inline const auto& get(const NamedTupleType& _tup) { return internal::Getter::template get_const(_tup); } } // namespace rfl #endif