I asked a similar question here, you may find the answers useful:
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| Parametrize a struct with numbers not types | 4 | 414 | January 12, 2024 | |
| Value as a type parameter, `X{1}` | 9 | 1120 | January 7, 2022 | |
| Designing a parametric type for storing bits | 7 | 568 | June 20, 2021 | |
| Parametric type with value of custom type as type parameter | 4 | 336 | October 24, 2022 | |
| Type with arbitrary number of parameters | 10 | 572 | May 26, 2023 |