summaryrefslogtreecommitdiff
path: root/test/std/thread/thread.threads/thread.thread.class/thread.thread.static/hardware_concurrency.pass.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/std/thread/thread.threads/thread.thread.class/thread.thread.static/hardware_concurrency.pass.cpp')
-rw-r--r--test/std/thread/thread.threads/thread.thread.class/thread.thread.static/hardware_concurrency.pass.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/std/thread/thread.threads/thread.thread.class/thread.thread.static/hardware_concurrency.pass.cpp b/test/std/thread/thread.threads/thread.thread.class/thread.thread.static/hardware_concurrency.pass.cpp
new file mode 100644
index 0000000000000..4d1ffad459377
--- /dev/null
+++ b/test/std/thread/thread.threads/thread.thread.class/thread.thread.static/hardware_concurrency.pass.cpp
@@ -0,0 +1,24 @@
+//===----------------------------------------------------------------------===//
+//
+// 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
+
+// unsigned hardware_concurrency();
+
+#include <thread>
+#include <cassert>
+
+int main()
+{
+ assert(std::thread::hardware_concurrency() > 0);
+}