Generic parameters in const operations

struct Image<const WIDTH: usize, const HEIGHT: usize> {
    pixels: [u8;WIDTH*HEIGHT]
}

I think this is supposed to work at some point in the future?

But it does not yet ... - "generic parameters may not be used in const operations"

Yes. Here a nightly Playground.

1 Like

Thanks - at least there is recent discussion in that thread so I guess it is coming.

1 Like

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.