From 77afe91db6f737eadf29d785cfcd3a83fc046337 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Fri, 11 Oct 2019 01:15:00 +0000 Subject: [PATCH] unit_tests: fix build with boost 1.69 --- tests/unit_tests/net.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/unit_tests/net.cpp b/tests/unit_tests/net.cpp index 253280d4d..262541bd2 100644 --- a/tests/unit_tests/net.cpp +++ b/tests/unit_tests/net.cpp @@ -893,7 +893,8 @@ TEST(dandelionpp_map, empty) TEST(dandelionpp_map, zero_stems) { std::vector connections{6}; - std::generate(connections.begin(), connections.end(), boost::uuids::random_generator{}); + for (auto &c: connections) + c = boost::uuids::random_generator{}(); net::dandelionpp::connection_map mapper{connections, 0}; EXPECT_EQ(mapper.begin(), mapper.end()); @@ -917,7 +918,8 @@ TEST(dandelionpp_map, zero_stems) TEST(dandelionpp_map, dropped_connection) { std::vector connections{6}; - std::generate(connections.begin(), connections.end(), boost::uuids::random_generator{}); + for (auto &c: connections) + c = boost::uuids::random_generator{}(); std::sort(connections.begin(), connections.end()); // select 3 of 6 outgoing connections @@ -953,7 +955,8 @@ TEST(dandelionpp_map, dropped_connection) } std::map mapping; std::vector in_connections{9}; - std::generate(in_connections.begin(), in_connections.end(), boost::uuids::random_generator{}); + for (auto &c: in_connections) + c = boost::uuids::random_generator{}(); { std::map used; std::multimap inverse_mapping;