17 namespace Acts::Test {
46 template <
typename val_tuple_t = std::tuple<>,
47 typename str_tuple_t = std::tuple<>>
52 constexpr
static std::size_t
kSize = std::tuple_size_v<val_tuple_t>;
53 static_assert(
kSize == std::tuple_size_v<str_tuple_t>);
57 auto newTuple = std::tuple_cat(
tuple, std::tuple<T>{value});
58 auto newStrings = std::tuple_cat(
strings, std::tuple<std::string>{name});
62 newInstance.strings =
std::move(newStrings);
67 template <
typename writer_t>
72 auto add = [&](
auto &
self,
auto N) {
73 if constexpr (
N() <
kSize) {
75 self(
self, std::integral_constant<std::size_t, N() + 1>{});
79 add(
add, std::integral_constant<std::size_t, 0>{});
81 writer.internalExecute(ctx);
84 template <
typename reader_t>
89 reader.internalExecute(ctx);
91 auto get = [&](
auto &
self,
auto res,
auto N) {
92 if constexpr (
N() <
kSize) {
93 using T = std::tuple_element_t<N(), val_tuple_t>;
94 auto val = getFromWhiteBoard<T>(std::get<N()>(
strings), board);
96 std::integral_constant<std::size_t, N() + 1>{});
102 return get(
get, std::tuple<>{}, std::integral_constant<std::size_t, 0>{});