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