Are you sure it compiles? I noticed that my statement was inaccurate since std::complex is not a container, but still, references are not copyable (though what they refer to may be copyable). So, what happens if you try to assign a std::complex<double&> to another std::complex<double&>? It would mean that you have to assign the references themselves so they refer to a different object, and as pointed out this is illegal.Quote:
It does compile however, but I've not tried to use it. What would the problem be? It seems like most of the natural complex op.s would work.