diff options
author | proller <proller@users.noreply.github.com> | 2018-12-06 14:13:15 +0300 |
---|---|---|
committer | James E. King III <jking@apache.org> | 2018-12-10 18:44:23 -0500 |
commit | f201bf05fbb56a33112e9f7ccf3790dffeab383e (patch) | |
tree | 4871e657210c2b441cac347835472153fb862363 | |
parent | 9c3d2d6c0ac6805fdb52cff582067a9cb6863caf (diff) | |
download | thrift-f201bf05fbb56a33112e9f7ccf3790dffeab383e.tar.gz |
Fix build with c++17
-rw-r--r-- | lib/cpp/src/thrift/transport/TSocketPool.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/cpp/src/thrift/transport/TSocketPool.cpp b/lib/cpp/src/thrift/transport/TSocketPool.cpp index 0cec25903..910fe523e 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) { |