2022-09-21 03:31:33 -04:00
|
|
|
//
|
2022-09-21 03:49:57 -04:00
|
|
|
// EuropaTools
|
2022-09-21 03:31:33 -04:00
|
|
|
//
|
|
|
|
// (C) 2021-2022 modeco80 <lily.modeco80@protonmail.ch>
|
|
|
|
//
|
2022-09-21 03:49:57 -04:00
|
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
2022-09-21 03:31:33 -04:00
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef EUROPA_UTIL_TUPLEELEMENT_H
|
|
|
|
#define EUROPA_UTIL_TUPLEELEMENT_H
|
|
|
|
|
|
|
|
#include <cstdint>
|
|
|
|
#include <cstddef>
|
|
|
|
|
|
|
|
#include <tuple>
|
|
|
|
|
|
|
|
namespace europa::util {
|
|
|
|
|
|
|
|
namespace detail {
|
|
|
|
|
|
|
|
template<std::size_t N>
|
|
|
|
struct TupleElementImpl {
|
|
|
|
template<typename T>
|
|
|
|
constexpr decltype(auto) operator()(T&& t) const {
|
|
|
|
using std::get;
|
|
|
|
return get<N>(std::forward<T>(t));
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
template<std::size_t N>
|
|
|
|
inline constexpr TupleElementImpl<N> TupleElement;
|
|
|
|
}
|
|
|
|
|
|
|
|
using detail::TupleElement;
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // EUROPA_UTIL_TUPLEELEMENT_H
|