Changing Template Static Ifs to Recursion

Stefan Koch via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed May 31 12:22:18 PDT 2017


On Wednesday, 31 May 2017 at 18:50:27 UTC, jmh530 wrote:
> I have a struct that I am using like a Tuple, but I want to be 
> able to opIndex in a different way than Tuple's opIndex. I want 
> to be able to opIndex whatever is underlying the Tuple.
>
> [...]

You could also use string mixins.
Which will be more efficient then recursion.


More information about the Digitalmars-d-learn mailing list