MCPcopy Create free account
hub / github.com/Neargye/magic_enum / constexpr_for

Function constexpr_for

test/test.cpp:1172–1177  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1170// from https://artificial-mind.net/blog/2020/10/31/constexpr-for
1171template <auto Start, auto End, auto Inc, class F>
1172constexpr void constexpr_for(F&& f) {
1173 if constexpr (Start < End) {
1174 f(std::integral_constant<decltype(Start), Start>());
1175 constexpr_for<Start + Inc, End, Inc>(f);
1176 }
1177}
1178
1179template <typename E, E V>
1180struct Foo {};

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected