I think all the parameterizations of your struct would compile down to the same thing, the only difference is when you dispatch on it and do something with the contained type parameter. I don’t know why you’d do this in the case you showed, but it might be helpful to “tag” similar structs in that way for some purposes.
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| No method matching error when calling generic constructor with concrete implementer of abstract type | 15 | 899 | January 12, 2021 | |
| Scope of parametric types and associated error messages | 5 | 563 | October 26, 2020 | |
| Parametric types - type definition in struct name or struct argument? | 8 | 536 | March 30, 2023 | |
| Recovering parameter type from parameter list | 15 | 2039 | January 11, 2017 | |
| Using parametric type inside outer parametric constructor | 33 | 2687 | January 16, 2021 |