I am trying to use typenum and generic_array to create the following struct:
use generic_array::{ArrayLength, GenericArray};
use typenum::{Prod, U2};
pub struct Foo<N>
where
N: ArrayLength<bool>,
{
a: GenericArray<bool, N>,
b: GenericArray<bool, Prod<N, U2>>,
}
The goal is to have the second array with double the size of the first. However this will not compile.
The type of N do not allow me to use Prod. How to make this work?