
13 Aug
2004
13 Aug
'04
12:47 p.m.
STL defines some common arithmetic operators, such as template<typename T> struct plus { T operator+(const T&, constT&); }; There is a need for more general operators: template<typename T1, typename T2, typename res> struct plus { res operator+(const T1&, constT2&); }; For example, std::complex<double> + double -> std::complex<double>. Has there been any discussion on this issue?