Home | History | Annotate | Download | only in syserr.errcode.nonmembers
      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 // <system_error>
     11 
     12 // class error_code
     13 
     14 // template <class charT, class traits>
     15 //   basic_ostream<charT,traits>&
     16 //   operator<<(basic_ostream<charT,traits>& os, const error_code& ec);
     17 
     18 #include <system_error>
     19 #include <sstream>
     20 #include <cassert>
     21 
     22 int main()
     23 {
     24     std::ostringstream out;
     25     out << std::error_code(std::io_errc::stream);
     26     assert(out.str() == "iostream:1");
     27 }
     28