18template <
typename... T>
25template <
typename... T>
29 return std::make_tuple(args...);
35template <
int INDEX,
typename... T>
36constexpr const std::tuple_element_t<INDEX, std::tuple<T...>>&
39 return std::get<INDEX>(tuple);
46template <
typename A,
typename B>
47using Pair = std::pair<A, B>;
52template <
typename A,
typename B>
56 return std::make_pair(a, b);
62template <
int INDEX,
typename A,
typename B>
63constexpr const std::tuple_element_t<INDEX, std::tuple<A, B>>&
66 static_assert(INDEX == 0 || INDEX == 1,
"Index has to be either 0 or 1");
67 return std::get<INDEX>(pair);
77template <
template <
typename>
class C,
typename T>
87template <
template <
typename,
int>
class C,
typename T,
int I>
98template <
template <
int,
typename>
class C,
int I,
typename T>
108template <
template <
typename>
class C,
typename T>
118template <
template <
int,
typename>
class C,
int I,
typename T>
128template <
template <
typename,
int>
class C,
typename T,
int I>
145template<
class...Ts, std::size_t...Is>
void
155template<
class...Ts>
void
165template<
class...Ts, std::size_t...Is>
void
168 (std::get<Is>(tuple).Clear(), ...);
175template<
class...Ts>
void
185template <
class...Ts, std::size_t...Is>
void
188 ((std::get<Is>(tuple)[to] = std::get<Is>(tuple)[from]), ...);
195template <
class...Ts>
void
206template <
class...Ts, std::size_t...Is>
void
209 (std::get<Is>(tuple).EraseIndex(i), ...);
217template <
class...Ts>
void
230template <
class...Ts, std::size_t...Is>
void
233 (std::get<Is>(tuple).EraseIndexSwap(i), ...);
243template <
class...Ts>
void
252template <
class...Ts, std::size_t...Is>
void
255 (std::get<Is>(tuple).EraseRange(start, end), ...);
263template <
class...Ts>
void
273template <
class...Ts, std::size_t...Is,
class...TYPES>
void
276 ((std::get<Is>(tuple)[i] = values), ...);
283template <
class...Ts,
class...TYPES>
void
293template <
class...Ts, std::size_t...Is>
void
296 (std::get<Is>(tuple).Reserve(size), ...);
303template <
class...Ts>
void
313template <
class...Ts, std::size_t...Is>
void
316 (std::get<Is>(tuple).SetSize(size), ...);
323template <
class...Ts>
void
333template <
int MEMBER,
class ... TYPES>
A pinned array is an array which manages its own virtual memory.
Definition String.cs:6
void move_for_each_in_tuple(std::tuple< Ts... > &tuple, uint32_t to, uint32_t from, std::index_sequence< Is... >)
Entry point for moving an element between two indices.
Definition tupleutility.h:186
void erase_range_for_each_in_tuple(std::tuple< Ts... > &tuple, uint32_t start, uint32_t end, std::index_sequence< Is... >)
Definition tupleutility.h:253
void erase_index_for_each_in_tuple(std::tuple< Ts... > &tuple, uint32_t i, std::index_sequence< Is... >)
Entry point for erasing an element.
Definition tupleutility.h:207
void reserve_for_each_in_tuple(std::tuple< Ts... > &tuple, uint32_t size, std::index_sequence< Is... >)
Entry point for reserving in each array.
Definition tupleutility.h:294
constexpr Pair< A, B > MakePair(const A &a, const B &b)
Definition tupleutility.h:54
void alloc_for_each_in_tuple(std::tuple< Ts... > &tuple, std::index_sequence< Is... >)
Unpacks allocations for each member in a tuble.
Definition tupleutility.h:146
void clear_for_each_in_tuple(std::tuple< Ts... > &tuple, std::index_sequence< Is... >)
Unpacks allocations for each member in a tuple.
Definition tupleutility.h:166
constexpr const std::tuple_element_t< INDEX, std::tuple< T... > > & Get(const Tuple< T... > &tuple)
Definition tupleutility.h:37
constexpr Tuple< T... > MakeTuple(const T &... args)
Definition tupleutility.h:27
void set_for_each_in_tuple(std::tuple< Ts... > &tuple, uint32_t i, std::index_sequence< Is... >, TYPES const &... values)
Entry point for setting values in each array at an index.
Definition tupleutility.h:274
get_template_type_t< std::tuple_element_t< MEMBER, std::tuple< Util::Array< TYPES >... > > > tuple_array_t
Get type of contained element in Util::Array stored in std::tuple.
Definition tupleutility.h:334
void erase_index_swap_for_each_in_tuple(std::tuple< Ts... > &tuple, uint32_t i, std::index_sequence< Is... >)
Entry point for erasing an element by swapping with the last and reducing size.
Definition tupleutility.h:231
std::tuple< T... > Tuple
Wrap std::tuple.
Definition tupleutility.h:19
void set_size_for_each_in_tuple(std::tuple< Ts... > &tuple, uint32_t size, std::index_sequence< Is... >)
Entry point for reserving in each array.
Definition tupleutility.h:314
typename get_template_type< C >::type get_template_type_t
Helper typedef so that the above expression can be used like decltype.
Definition tupleutility.h:139
std::pair< A, B > Pair
Wrap std::pair.
Definition tupleutility.h:47
T type
Definition tupleutility.h:101
T type
Definition tupleutility.h:121
T type
Definition tupleutility.h:90
T type
Definition tupleutility.h:131
T type
Definition tupleutility.h:80
T type
Definition tupleutility.h:111
Definition tupleutility.h:71