Jonathan M Davis:

> But what you're doing is basically the same as 
> the eponymous template except that it's saving the value to in a function so 
> that it can be called at runtime. The gain is 0 and potentially confusing.
> It's no better than
> 
> bool compatibleStringsFunc(Strings...)()
> {
>       enum retval = compatibleStrings!Strings;
>       return retval;
> }

The gain of my version is that it doesn't generate tons of templates. From my 
experience such functions lead to faster compile times and less memory used by 
the compiler compared to using recursive templates. And for me a foreach is 
usually less confusing than recursive templates :-)

Bye,
bearophile

Reply via email to