|
Boost : |
From: Neal D. Becker (nbecker_at_[hidden])
Date: 2002-06-18 12:51:58
There are various deficiencies in std::complex in the sense that not
all conversions that might be expected are supported. Perhaps boost
could add a library to help make this a little easier.
Here is an example of a useful function that can be added without
changing std::complex:
template<typename flt1, typename flt2>
inline std::complex<flt1> ComplexCvt (std::complex<flt2> z) {
return std::complex<flt1> (real (z), imag (z));
}
Another area that needs help is interoperation of complex<flt1> with
complex<flt2>, and also with flt3 (scalar). For example:
complex<double> x * 2
I don't know if this latter issue can be addressed without
modification to std::complex, however.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk