Hacker News new | ask | show | jobs
by moonshadow565 506 days ago
P1061 is in C++26 so you can instead do:

  const auto [...I] = std::make_index_sequence<INPUT_COUNT>{};
  ((SetupInput<I>(options, transport_manager, subscriber_queues[I], thread_pool, templated_topic_to_runtime_topic)),...);
yay!
2 comments

Oh, that is nice!
That's better, yeah. I still prefer plain ole for loops, but that's much better.