operator<<

template<class E, class T, class U>
    basic_ostream<E, T>& operator<<(basic_ostream<E, T>& os,
        const complex<U>& x);

The template function inserts the complex value x into 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.