https://issues.dlang.org/show_bug.cgi?id=9591
Steven Schveighoffer <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED CC| |[email protected] Resolution|WONTFIX |--- --- Comment #2 from Steven Schveighoffer <[email protected]> --- std.typetuple was moved to std.meta, so the request is still valid. We have ApplyLeft and ApplyRight, which take a template as the first parameter, and combined with staticMap, could work as long as the parameters are reversed (the template comes last). Having something that applies a single parameter (or even multipe ones) to a list of templates would be useful as well, and is difficult to do directly. However, I don't think we need a specific function, a helper like this would work: template ApplyWith(Args...) { alias ApplyWith = ApplyLeft!(Args[$-1], Args[0 .. $-1]); } alias T = staticMap!(ApplyLeft!(ApplyWith, string), leftJustify, center, rightJustify); void main() { foreach(f; T) writeln(f("hello", 20)); } It's not perfect. The resulting T isn't a tuple of instantiated templates, it's a tuple of ApplyLeft aliases, awaiting instantiation. But a helper like the above would be useful. Is there an "Instantiate" template that could be used in place of ApplyLeft inside the ApplyWith template? That might be more proper. --
