stream.pass.cpp 801 B

1234567891011121314151617181920212223242526272829303132
  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-threads
  10. // <thread>
  11. // class thread::id
  12. // template<class charT, class traits>
  13. // basic_ostream<charT, traits>&
  14. // operator<<(basic_ostream<charT, traits>& out, thread::id id);
  15. #include <thread>
  16. #include <sstream>
  17. #include <cassert>
  18. #include "test_macros.h"
  19. int main(int, char**)
  20. {
  21. std::thread::id id0 = std::this_thread::get_id();
  22. std::ostringstream os;
  23. os << id0;
  24. return 0;
  25. }