From the D Blog: (Ab)using Overload Sets to Create Ad-Hoc Template APIs
Kapendev
alexandroskapretsos at gmail.com
Tue Jul 21 23:53:48 UTC 2026
On Tuesday, 21 July 2026 at 23:41:28 UTC, jmh530 wrote:
> In the part about GVec, what if you already have code that
> relies on the library with GVec2/3/4 and want to integrate it
> with this?
I think it's an easy change. Something like:
```d
// Old: GVec2(T) { ... }
GVec(T, int N : 2) { ... }
alias GVec2(T) = GVec!(T, 2);
```
The reason why I haven't done it is because I prefer the
simplicity of a single template argument. It's an opinion. I
might change it one day.
More information about the Digitalmars-d-announce
mailing list