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 2264ae9247
commit 8caae219cf
2 changed files with 4 additions and 13 deletions

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