nngn
Loading...
Searching...
No Matches
tuple.h
Go to the documentation of this file.
1#ifndef NNGN_UTILS_TUPLE_H
2#define NNGN_UTILS_TUPLE_H
3
4#include <tuple>
5
6#include "utils/utils.h"
7
8namespace nngn {
9
10template<typename T>
11auto tuple_tail(T &&t) {
12 constexpr auto n = std::tuple_size_v<std::decay_t<T>>;
13 return []<auto I, auto ...Is>(auto &&t_, std::index_sequence<I, Is...>) {
14 return std::tuple{std::get<Is>(FWD(t_))...};
15 }(FWD(t), std::make_index_sequence<n>());
16}
17
18}
19
20#endif
local n
Definition dump_lights.lua:5
#define T(f0, f1, f2)
Definition audio.cpp:7
auto tuple_tail(T &&t)
Definition tuple.h:11
#define FWD(...)
Definition utils.h:18