On 02/23/2014 11:32 AM, Marc Glisse wrote:
Hello,
looking at this question:
http://stackoverflow.com/q/21737186/1918193
I was surprised to see that libstdc++'s std::complex basically just
works with user-defined types, even weird expression template ones,
although that's not a supported use afaik.
The only functions that fail seem to be exp and pow, both because they
call polar with two arguments that have different (expression) types.
I am not proposing to make this a supported use, but the cost of this
small patch seems very low, and if it makes a couple users happy...
Regtested with no problem on x86_64-linux-gnu, ok for stage 1?
I would even be in favor of applying it now. Can we figure out simple
(ie, not relying on boost...) testcases too?
Paolo.