1 module imports.template_ovs2; 2 3 /***************************************************/ 4 // 1900 - template overload set 5 6 auto foo1900a(T)(T arg) if (is(T : const(char)[])) { return 2; } 7 auto foo1900b(int num) { return 1; } 8 9 auto bar1900a(T)(T arg) if (is(T : const(char)[])) { return 2; } 10 auto bar1900b(T)(T arg) if (is(T : double)) { return 1; } 11 12 auto baz1900(T)(T arg) if (is(T : Object)) { return 3; } 13 auto baz1900(T)(T arg) if (is(T : const(char)[])) { return 4; } 14 15 auto bad1900(string op)() if (op == "++") { return 2; } 16 17 mixin template Mix1900_B() 18 { 19 auto mixfooa(T)(T) { return 2; } 20 auto mixfoob() { return 1; } 21 22 mixin Mix1900_SubB; 23 } 24 25 mixin template Mix1900_SubB() 26 { 27 auto mixsubfooa(T)(T) { return 2; } 28 auto mixsubfoob() { return 1; } 29 } 30 31 auto merge1900(T)(string) 32 { 33 return 2; 34 } 35 36 /***************************************************/ 37 // 1900 38 39 class BClass1900 {} 40 template Traits1900(T : BClass1900) { enum name = "BClass"; } 41 string func1900(BClass1900 b) { return "BClass"; } 42 43 void Value1900a() {} 44 template Value1900a(T) if (is(T == string)) { enum Value1900a = 2; } 45 46 template Value1900b(T) if (is(T == string)) { enum Value1900b = 2; } 47 void Value1900b() {} 48 49 /***************************************************/ 50 // 8352 51 52 void remove8352a(in char[] name) {} 53 Range remove8352b(alias pred, Range)(Range range) { return range; } 54 55 /***************************************************/ 56 // 10658 57 58 template Val10658(long n) { enum Val10658 = 2; }