2 ms·
Before const generics, you needed this kind of "types" to use integer values in generics, for example for fixed-length vectors/matrices/... (and const generics
by ReleaseCandidat 3y ago
Before const generics, you needed this kind of "types" to use integer values in generics, for example for fixed-length vectors/matrices/... (and const generics still have limitations).
https://doc.rust-lang.org/reference/items/generics.html#const-generics https://doc.rust-lang.org/reference/items/generics.html#cons...
They came with 1.51: https://blog.rust-lang.org/2021/03/25/Rust-1.51.0.html https://blog.rust-lang.org/2021/03/25/Rust-1.51.0.html
- hgomersall 3y agoYou still need them for many cases the current const generics implementation doesn't support.