diff options
Diffstat (limited to 'test/std/thread/thread.threads/thread.thread.class/thread.thread.id/stream.pass.cpp')
-rw-r--r-- | test/std/thread/thread.threads/thread.thread.class/thread.thread.id/stream.pass.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/stream.pass.cpp b/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/stream.pass.cpp new file mode 100644 index 0000000000000..126965fe3fc38 --- /dev/null +++ b/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/stream.pass.cpp @@ -0,0 +1,29 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// UNSUPPORTED: libcpp-has-no-threads + +// <thread> + +// class thread::id + +// template<class charT, class traits> +// basic_ostream<charT, traits>& +// operator<<(basic_ostream<charT, traits>& out, thread::id id); + +#include <thread> +#include <sstream> +#include <cassert> + +int main() +{ + std::thread::id id0 = std::this_thread::get_id(); + std::ostringstream os; + os << id0; +} |