Files
SourMesen e391fd8f9a Code: Add auto-formatting rules for C++ (clang-format) and enforce in CI via "clang-format" and "dotnet format" (#78)
* Code: Add auto-formatting rules for C++ projects (clang-format) and enforce code style via "clang-format" and "dotnet format"

* fix ui format warnings
2026-04-30 06:03:55 -07:00

21 lines
408 B
C++

#pragma once
template<int first, int last>
struct StaticFor
{
template<typename callback>
static inline constexpr void Apply(callback const& f)
{
if constexpr(first < last) {
f(std::integral_constant<int, first> {});
StaticFor<first + 1, last>::Apply(f);
}
}
};
template<int n>
struct StaticFor<n, n>
{
template<typename callback>
static inline constexpr void Apply(callback const& f) {}
};