opIndex for type list

Adam D. Ruppe destructionator at gmail.com
Mon Aug 24 14:36:22 UTC 2020


On Monday, 24 August 2020 at 14:19:14 UTC, data pulverizer wrote:
> I am trying to implement `opIndex` (e.g. T[i]) for types in a 
> struct. So for I have `length`:

Can't really do that, the operator overloads work on instances 
instead of static types.

AliasSeq is magical because it just gives a name to something 
built-into the compiler.


More information about the Digitalmars-d-learn mailing list