Home | History | Annotate | Download | only in thread.thread.id
      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 // UNSUPPORTED: libcpp-has-no-threads
     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 int main()
     25 {
     26     std::thread::id id0 = std::this_thread::get_id();
     27     std::ostringstream os;
     28     os << id0;
     29 }
     30