This is an automated email from the ASF dual-hosted git repository. jking pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/thrift.git
commit f201bf05fbb56a33112e9f7ccf3790dffeab383e Author: proller <[email protected]> AuthorDate: Thu Dec 6 14:13:15 2018 +0300 Fix build with c++17 --- lib/cpp/src/thrift/transport/TSocketPool.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/cpp/src/thrift/transport/TSocketPool.cpp b/lib/cpp/src/thrift/transport/TSocketPool.cpp index 0cec259..910fe52 100644 --- a/lib/cpp/src/thrift/transport/TSocketPool.cpp +++ b/lib/cpp/src/thrift/transport/TSocketPool.cpp @@ -21,6 +21,7 @@ #include <algorithm> #include <iostream> +#include <random> #include <thrift/transport/TSocketPool.h> @@ -188,7 +189,9 @@ void TSocketPool::open() { } if (randomize_ && numServers > 1) { - random_shuffle(servers_.begin(), servers_.end()); + std::random_device rng; + std::mt19937 urng(rng()); + std::shuffle(servers_.begin(), servers_.end(), urng); } for (size_t i = 0; i < numServers; ++i) {
