18#include <initializer_list>
23template <
typename F, uint8_t... Is>
24static inline __attribute__((always_inline))
void unroll_impl(F&& f, std::integer_sequence<uint8_t, Is...>) {
26 (void)std::initializer_list<uint8_t>{ (f(std::integral_constant<uint8_t, Is>{}), (uint8_t)0)... };
55template <u
int8_t N,
typename F>
56static inline __attribute__((always_inline))
void static_for(F&& f) {
57 detail::unroll_impl(std::forward<F>(f), std::make_integer_sequence<uint8_t, N>{});
static void static_for(F &&f)
Generate a fixed number of calls to a given free function at compile time.
Definition static_for.hpp:56