operator>>

template<class E, class T, class U>
    basic_istream<E, T>& operator>>(basic_istream<E, T>& is,
        complex<U>& x);

The template function attempts to extract a complex value from the input stream is, effectively by executing:

is >> ch && ch == '('
    is >> re >> ch && ch == ','
    is >> im >> ch && ch == ')'

Here, ch is an object of type E, and re and im are objects of type U.

If the result of this expression is true, the function stores re in the real part and im in the imaginary part of x. In any event, the function returns is.