1*5a83710eSEric Fiselier //===----------------------------------------------------------------------===// 2*5a83710eSEric Fiselier // 3*5a83710eSEric Fiselier // The LLVM Compiler Infrastructure 4*5a83710eSEric Fiselier // 5*5a83710eSEric Fiselier // This file is dual licensed under the MIT and the University of Illinois Open 6*5a83710eSEric Fiselier // Source Licenses. See LICENSE.TXT for details. 7*5a83710eSEric Fiselier // 8*5a83710eSEric Fiselier //===----------------------------------------------------------------------===// 9*5a83710eSEric Fiselier // 10*5a83710eSEric Fiselier // UNSUPPORTED: libcpp-has-no-threads 11*5a83710eSEric Fiselier 12*5a83710eSEric Fiselier // <thread> 13*5a83710eSEric Fiselier 14*5a83710eSEric Fiselier // class thread::id 15*5a83710eSEric Fiselier 16*5a83710eSEric Fiselier // template<class charT, class traits> 17*5a83710eSEric Fiselier // basic_ostream<charT, traits>& 18*5a83710eSEric Fiselier // operator<<(basic_ostream<charT, traits>& out, thread::id id); 19*5a83710eSEric Fiselier 20*5a83710eSEric Fiselier #include <thread> 21*5a83710eSEric Fiselier #include <sstream> 22*5a83710eSEric Fiselier #include <cassert> 23*5a83710eSEric Fiselier 24*5a83710eSEric Fiselier int main() 25*5a83710eSEric Fiselier { 26*5a83710eSEric Fiselier std::thread::id id0 = std::this_thread::get_id(); 27*5a83710eSEric Fiselier std::ostringstream os; 28*5a83710eSEric Fiselier os << id0; 29*5a83710eSEric Fiselier } 30