Am Wed, 08 Aug 2012 12:30:31 -0700 schrieb Walter Bright <newshou...@digitalmars.com>:
> On 8/8/2012 12:05 PM, Johannes Pfau wrote: > > So the post in D.learn for a detailed description. Yes the code I > > posted takes a range, but digest (as it is now) takes void[][] to > > accept all kind of types _without_ template bloat. The difficulty > > is to combine those two overloads without causing unnecessary > > template bloat. > > Have the templated version with overloads simply call the single > version (with a different name) with void[][]. > > Well that's possible, but I don't like the template bloat it causes. AFAIK a function taking a void[][] is just one instance, with that redirecting approach we'll have one instance per array type. This seems unnecessary (and maybe the compiler can merge such template instances in the future), but I can't seem to find a way to avoid it, so we'll probably have to live with that. http://dpaste.dzfl.pl/f86717f7 I guess a second function digestRange is not acceptable?