Gracefully cast from std:🧵:hardware_concurrency

This commit is contained in:
Howard Hinnant
2014-10-14 10:33:10 -04:00
committed by Tom Ritchford
parent e965b7c0da
commit 96a3a34fa4

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 ();