1 //===----------------------------------------------------------------------===// 2 // 3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 // See https://llvm.org/LICENSE.txt for license information. 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 // 7 //===----------------------------------------------------------------------===// 8 9 // UNSUPPORTED: libcpp-has-no-localization 10 11 // <system_error> 12 13 // class error_code 14 15 // template <class charT, class traits> 16 // basic_ostream<charT,traits>& 17 // operator<<(basic_ostream<charT,traits>& os, const error_code& ec); 18 19 #include <system_error> 20 #include <sstream> 21 #include <cassert> 22 23 #include "test_macros.h" 24 main(int,char **)25int main(int, char**) 26 { 27 std::ostringstream out; 28 out << std::error_code(std::io_errc::stream); 29 assert(out.str() == "iostream:1"); 30 31 return 0; 32 } 33