1*5a83710eSEric Fiselier //===----------------------------------------------------------------------===// 2*5a83710eSEric Fiselier // 3*5a83710eSEric Fiselier // The LLVM Compiler Infrastructure 4*5a83710eSEric Fiselier // 5*5a83710eSEric Fiselier // This file is dual licensed under the MIT and the University of Illinois Open 6*5a83710eSEric Fiselier // Source Licenses. See LICENSE.TXT for details. 7*5a83710eSEric Fiselier // 8*5a83710eSEric Fiselier //===----------------------------------------------------------------------===// 9*5a83710eSEric Fiselier 10*5a83710eSEric Fiselier // <complex> 11*5a83710eSEric Fiselier 12*5a83710eSEric Fiselier // template<class T, class charT, class traits> 13*5a83710eSEric Fiselier // basic_ostream<charT, traits>& 14*5a83710eSEric Fiselier // operator<<(basic_ostream<charT, traits>& o, const complex<T>& x); 15*5a83710eSEric Fiselier 16*5a83710eSEric Fiselier #include <complex> 17*5a83710eSEric Fiselier #include <sstream> 18*5a83710eSEric Fiselier #include <cassert> 19*5a83710eSEric Fiselier 20*5a83710eSEric Fiselier int main() 21*5a83710eSEric Fiselier { 22*5a83710eSEric Fiselier std::complex<double> c(1, 2); 23*5a83710eSEric Fiselier std::ostringstream os; 24*5a83710eSEric Fiselier os << c; 25*5a83710eSEric Fiselier assert(os.str() == "(1,2)"); 26*5a83710eSEric Fiselier } 27