1 2 3 /**************************************/ 4 // 6538 5 allSatisfy(alias F,T...)6template allSatisfy(alias F, T...) { enum bool allSatisfy = true; } isIntegral(T)7template isIntegral(T) { enum bool isIntegral = true; } 8 9 void foo(I...)(I sizes) 10 if (allSatisfy!(isIntegral, sizes)) {} 11 test6538a()12void test6538a() 13 { 14 foo(42, 86); 15 } 16 17 void bar(T1, T2)(T1 t1, T2 t2) 18 if (allSatisfy!(isIntegral, t1, t2)) {} 19 test6538b()20void test6538b() 21 { 22 bar(42, 86); 23 } 24 25 /**************************************/ 26 // 9361 27 Sym(alias A)28template Sym(alias A) 29 { 30 enum Sym = true; 31 } 32 33 struct S 34 { 35 void foo()() if (Sym!(this)) {} barS36 void bar()() { static assert(Sym!(this)); } // OK 37 } test9361a()38void test9361a() 39 { 40 S s; 41 s.foo(); // fail 42 s.bar(); // OK 43 } 44