Tuple IFTI with implicit conversions

Reiner Pope some at address.com
Sat Oct 20 04:17:22 PDT 2007


BCS wrote:
> Reply to Reiner,
> 
>> (A follow-up from "Any ideas for lazy evaluation on varaible argument
>> functions?")
>>
>> Daniel Keep wrote:
>>
>>> Sadly, I don't think there's any way to fix this.  The problem is
>>> that if you've got IFTI (which is what allows you to omit the
>>> explicit template instantiation), the arguments can't be very
>>> complex.  What you would need is something like this:
>>>
>>> void infoF(A...)(lazy DecayStaticArrays!(A) a) { ... }
>>>
>>> Where "DecayStaticArrays" turns all statically-sized arrays into
>>> dynamically-sized ones: so (char[2u], char[6u]) would become (char[],
>>> char[]).
>>>
> [...]
> 
> LOL
> 
> Take a look at my replay to Daniel Keep's post
> 
> in short, I just suggested a slightly more general form of the exact 
> same idea.

Yes, I think what you suggest is nicer, since it works equally well for 
the non-variadic case. See my reply there for more.

    -- Reiner



More information about the Digitalmars-d mailing list