#pragma once #include #include #include #include namespace util { namespace detail { template inline constexpr std::integer_sequence add_offset(std::integer_sequence) { return {}; } } // namespace detail template inline constexpr auto make_offset_integer_sequence() { return detail::add_offset(std::make_integer_sequence{}); } template inline constexpr auto make_offset_index_sequence() { return make_offset_integer_sequence(); } template constexpr auto for_constexpr(Fn &&func, std::index_sequence) { if constexpr (std::is_void_v>>) { (func(std::integral_constant{}), ...); } else { if ((func(std::integral_constant{}) && ...)) return true; return false; } } template struct always_false : std::false_type { }; template inline constexpr auto always_false_v = always_false::value; } // namespace util