enable c++17 parallel algorithms through TBB
[awesomized/libmemcached] / test / lib / Cluster.cpp
index 1186077b2b945187a4042041b00b211e399789b2..1589e68ccf6906f9f699b4924ba5e00289a0a937 100644 (file)
@@ -2,6 +2,9 @@
 #include "Retry.hpp"
 
 #include <algorithm>
+#if HAVE_EXECUTION
+#  include <execution>
+#endif
 #include <sys/wait.h>
 
 Cluster::Cluster(Server serv, size_t cnt)
@@ -66,7 +69,7 @@ bool Cluster::isListening() const {
 #if HAVE_EXECUTION
     execution::par,
 #endif
-      cluster.cbegin(), cluster.cend(), [](const Server &s) {
+      cluster.begin(), cluster.end(), [](const Server &s) {
     return s.isListening();
   });
 }