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