Fix compilation on gcc-15: int template arguments can't be implicitly casted to size_t

This commit is contained in:
Nikita Lisitsa 2026-01-25 14:20:36 +03:00
parent 23f153c38d
commit 0e813c3307

View file

@ -24,7 +24,7 @@ namespace psemek::math
#pragma GCC diagnostic push #pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Warray-bounds" #pragma GCC diagnostic ignored "-Warray-bounds"
template <std::size_t ... I> template <int ... I>
constexpr auto swizzle = [](auto const & x){ constexpr auto swizzle = [](auto const & x){
static_assert(((I == -1 || I < std::decay_t<decltype(x)>::static_dimension) && ...)); static_assert(((I == -1 || I < std::decay_t<decltype(x)>::static_dimension) && ...));
using result = typename detail::swizzle_rebind<std::decay_t<decltype(x)>>::template type<sizeof...(I)>; using result = typename detail::swizzle_rebind<std::decay_t<decltype(x)>>::template type<sizeof...(I)>;