template<class U, class E, class T>
basic_ostream<E, T>&
operator<<(basic_ostream<E, T>& os,
const complex<U>& x);
The template function inserts the complex value x in the output stream os, effectively by executing:
basic_ostringstream<E, T> ostr;
ostr.flags(os.flags());
ostr.imbue(os.imbue());
ostr.precision(os.precision());
ostr << '(' << real(x) << ','
<< imag(x) << ')';
os << ostr.str().c_str();
Thus, if os.width() is greater than zero, any padding occurs either before or after the parenthesized pair of values, which itself contains no padding. The function returns os.