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 // UNSUPPORTED: libcpp-has-no-localization 11 12 // <thread> 13 14 // class thread::id 15 16 // template<class charT, class traits> 17 // basic_ostream<charT, traits>& 18 // operator<<(basic_ostream<charT, traits>& out, thread::id id); 19 20 #include <thread> 21 #include <sstream> 22 #include <cassert> 23 24 #include "test_macros.h" 25 26 int main(int, char**) 27 { 28 std::thread::id id0 = std::this_thread::get_id(); 29 std::ostringstream os; 30 os << id0; 31 32 return 0; 33 } 34