DIP Mir1 Draft: Variadic template parameters with the same time.

pineapple via Digitalmars-d digitalmars-d at puremagic.com
Thu Sep 29 12:03:00 PDT 2016


On Thursday, 29 September 2016 at 18:56:40 UTC, Ilya Yaroshenko 
wrote:
> No, it does not
> ---
> void foo(size_t[] I...)(I i)
> {
> 	
> }

Using phobos' allSatisfy or a similar template, this can become:

     enum isIndex(T) = is(T == size_t);
     void foo(I...)(I i) if(allSatisfy!(isIndex, I)){ ... }


More information about the Digitalmars-d mailing list