A pattern I'd like to see more of - Parsing template parameter tuples

Ethan gooberman at gmail.com
Mon May 21 09:30:47 UTC 2018


On Monday, 21 May 2018 at 03:30:37 UTC, Paul Backus wrote:
> Am I missing something, or is this the same thing as `std.meta: 
> Filter`?

Nope, I am missing something.

I don't find the std library documentation anywhere near as easy 
to look through as something like cppreference.com, so I only 
tend to go there when I know what I'm looking for.

And in this case, I know the std.meta containers are implemented 
using recursive templates. Which is not particularly nice on the 
compiler. The difference with mine (apart from the name mismatch) 
is that I use string mixins and iterate over items in a for loop, 
which I've done with quite a few traits to try and get compile 
times a bit more reasonable on larger codebases.

Otherwise, the usage technique is exactly the same.


More information about the Digitalmars-d mailing list