Gracefully cast from std::thread::hardware_concurrency

This commit is contained in:
Howard Hinnant
2014-10-14 12:35:17 -04:00
committed by Tom Ritchford
parent e965b7c0da
commit 96a3a34fa4
+2 -1
View File
@@ -56,7 +56,8 @@ public:
*/
explicit Workers (Callback& callback,
String const& threadNames = "Worker",
int numberOfThreads = std::thread::hardware_concurrency());
int numberOfThreads =
static_cast<int>(std::thread::hardware_concurrency()));
~Workers ();