Iros
 
Loading...
Searching...
No Matches
tuple_cat.h
Go to the documentation of this file.
1#pragma once
2
8
9namespace di::vocab {
10template<concepts::TupleLike... Tups>
11constexpr auto tuple_cat(Tups&&... tuples) {
12 auto helper = function::overload(
13 [] {
14 return Tuple<> {};
15 },
16 [](auto&& x) {
17 return x;
18 },
19 []<typename X, typename Y>(X&& x, Y&& y) {
22 [&]<size_t... ys>(meta::ListV<ys...>) {
25 // NOLINTNEXTLINE(bugprone-use-after-move)
26 util::get<xs>(util::forward<X>(x))..., util::get<ys>(util::forward<Y>(y))...
27 };
28 });
29 });
30 },
31 []<typename X, typename Y, typename... Rs>(X&& x, Y&& y, Rs&&... rest) {
32 return tuple_cat(tuple_cat(util::forward<X>(x), util::forward<Y>(y)), util::forward<Rs>(rest)...);
33 });
34 return helper(util::forward<Tups>(tuples)...);
35}
36}
37
38namespace di {
40}
Definition tuple_forward_declaration.h:5
constexpr auto unpack
Definition unpack.h:24
constexpr auto overload
Definition overload.h:28
decltype(vocab::tuple_element(types::in_place_type< meta::RemoveReference< T > >, c_< index >))::Type TupleElement
Definition tuple_element.h:21
constexpr auto get(T &&value) -> decltype(auto)
Definition get.h:8
Definition lazy.h:165
constexpr auto tuple_cat(Tups &&... tuples)
Definition tuple_cat.h:11
Definition zstring_parser.h:9
Definition core.h:8