I’m sure the author already knows this, but you could accomplish the stated goal for the SIMD swizzle use case with a const fn:
const fn
impl<const N: usize> Swizzle<N> for FetchEven<N> { const INDEX: [usize; N] = compute_FetchEven_INDEX(); }
Full playground with FetchEven and SwapPairs examples.
I’m sure the author already knows this, but you could accomplish the stated goal for the SIMD swizzle use case with a
const fn:Full playground with FetchEven and SwapPairs examples.