#pragma once #include #include template inline constexpr bool static_in_v = std::disjunction_v...>; template bool func_wrapper(Func && func, Arg && arg) { if constexpr (std::is_void_v>) { func(arg); return false; } else return func(arg); } template constexpr bool static_for_impl(Func && f, std::integer_sequence) { return (func_wrapper(std::forward(f), std::integral_constant{}) || ...); } template constexpr bool static_for(Func && f) { using T = decltype(Begin); return static_for_impl(std::forward(f), std::make_integer_sequence{}); }