From the D Blog: (Ab)using Overload Sets to Create Ad-Hoc Template APIs

monkyyy crazymonkyyy at gmail.com
Wed Jul 22 07:15:29 UTC 2026


On Wednesday, 22 July 2026 at 01:01:31 UTC, jmh530 wrote:
> On Tuesday, 21 July 2026 at 23:53:48 UTC, Kapendev wrote:
>>
>> // Old: GVec2(T) { ... }
>> GVec(T, int N : 2) { ... }
>> alias GVec2(T) = GVec!(T, 2);
>> ```

> GVec2's in scope if you do something like this?

aliases airnt types, they are an op code for overload set 
manipulation `alias myint=int` does NOT do as your expecting


More information about the Digitalmars-d-announce mailing list