#pragma once #include namespace floormat::detail { template std::array constexpr iota_array_() { static_assert( size_t(Type(Count)) == Count ); std::array ret; for (size_t i = 0; i < Count; i++) ret[i] = Type(i); return ret; } } // namespace floormat::detail namespace floormat { template constexpr inline std::array iota_array = detail::iota_array_(); } // namespace floormat