fizyk20/generic-array

Is the reason for this crate still valid with const generics? If so, maybe update docs.

Closed this issue · 1 comments

This is the motivating example for this crate (slight difference between README and docs):

struct Foo<T, N> {
    data: [T; N]
}

Could this not be written (in recent Rust versions) as:

struct Foo<T, const N: usize> {
    data: [T; N]
}

If not, maybe update the motivating example?

I had the same question and just reviewed the 1.0.0-alpha.1 docs and it does indeed clarify the rationale for this crate (as claimed in #138). This includes an example of limitations of const generics which this crate addresses.

Thanks!