struct boolean { alias TT!(bool) x; }
struct integral { alias TT!(byte, ubyte, short, ushort, int, uint, long, ulong) x; }
struct floating { alias TT!(float, double, real) x; }
-struct imaginary { alias TT!(ifloat, idouble, ireal) x; }
-struct complex { alias TT!(cfloat, cdouble, creal) x; }
struct all { alias TT!("+=", "-=", "*=", "/=", "%=", "&=", "|=", "^=", "<<=", ">>=", ">>>=") x; }
struct arith { alias TT!("+=", "-=", "*=", "/=", "%=") x; }
X!(floating, boolean, arith)();
X!(floating, integral, arith)();
X!(floating, floating, arith)();
-
- X!(imaginary, boolean, muldivmod)();
- X!(imaginary, integral, muldivmod)();
- X!(imaginary, floating, muldivmod)();
- X!(imaginary, imaginary, addsub)();
-
- X!(complex, boolean, arith)();
- X!(complex, integral, arith)();
- X!(complex, floating, arith)();
- X!(complex, imaginary, arith)();
- X!(complex, complex, nomod)();
}
void OpReAssignCases(alias X)()
X!(floating, boolean, arith)();
X!(floating, integral, arith)();
X!(floating, floating, arith)();
-
- X!(imaginary, boolean, muldivmod)();
- X!(imaginary, integral, muldivmod)();
- X!(imaginary, floating, muldivmod)();
- X!(imaginary, imaginary, addsub)();
-
- X!(complex, boolean, arith)();
- X!(complex, integral, arith)();
- X!(complex, floating, arith)();
- X!(complex, imaginary, arith)();
- X!(complex, complex, nomod)();
}
void main()
{
OpAssignCases!TestOpAssign();
OpAssignCases!TestOpAssignAssign(); // was once disabled due to bug 7436
- OpAssignCases!TestOpAssignAuto(); // 5181
+ OpAssignCases!TestOpAssignAuto(); // https://issues.dlang.org/show_bug.cgi?id=5181
OpReAssignCases!TestOpAndAssign();
}