As we currently aren't reviewing anything (We still need a review manager for David's RegionAllocator or whatever we decide to receive next? Do you want to get things going Jonathan? Should I do it again? Anybody else?), I thought I would take the opportunity to ask for comments on a few little template metaprogramming helpers:

https://gist.github.com/1191885

Besides a few helpers for manipulating/combining template predicates, the above link contains three main:

StaticFilter – like std.algorithm.filter, but for type tuples using template predicates. PApply – like the unluckily named std.functional.curry, but for template parameters
Compose - alias Compose!(A, B, C) Comp; // Comp!D is now A!(B!(C!D)).

I had originally whipped these up on the fly while working on some metaprogramming-heavy code, but they have proven useful in other projects as well. What do you think? Would some of these be worthy additions to Phobos? Do you have similar stuff lying around in your own code?

Thanks,
David

Reply via email to