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

Function constexpr_for

test/test_flags.cpp:752–757  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

750// from https://artificial-mind.net/blog/2020/10/31/constexpr-for
751template <auto Start, auto End, auto Inc, class F>
752constexpr void constexpr_for(F&& f) {
753 if constexpr (Start < End) {
754 f(std::integral_constant<decltype(Start), Start>());
755 constexpr_for<Start + Inc, End, Inc>(f);
756 }
757}
758
759template <typename E, E V>
760struct Foo {};

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected