From 39fc8a7a01ccb67f173e4746d4b72f21b70475f2 Mon Sep 17 00:00:00 2001 From: Adam Wulkiewicz Date: Sun, 31 Mar 2013 14:01:03 +0000 Subject: [PATCH] rtree test: std::copy() replaced by other implementation because of MSVC warnings. [SVN r83664] --- test/index/rtree/test_rtree.hpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/test/index/rtree/test_rtree.hpp b/test/index/rtree/test_rtree.hpp index 9915929c7..6d773b227 100644 --- a/test/index/rtree/test_rtree.hpp +++ b/test/index/rtree/test_rtree.hpp @@ -988,6 +988,13 @@ void test_copy_assignment_swap_move(Rtree const& tree, Box const& qbox) //TODO - test SWAP } +template +inline void my_copy(I first, I last, O out) +{ + for ( ; first != last ; ++first, ++out ) + *out = *first; +} + // rtree creation and insertion template @@ -1007,7 +1014,8 @@ void test_create_insert(Rtree & tree, std::vector const& input, Box const } { Rtree t(tree.parameters(), tree.indexable_get(), tree.value_eq(), tree.get_allocator()); - std::copy(input.begin(), input.end(), bgi::inserter(t)); + //std::copy(input.begin(), input.end(), bgi::inserter(t)); + my_copy(input.begin(), input.end(), bgi::inserter(t)); // to suppress MSVC warnings BOOST_CHECK(tree.size() == t.size()); std::vector output; t.query(bgi::intersects(qbox), std::back_inserter(output)); @@ -1440,4 +1448,4 @@ void test_rtree_for_box(Parameters const& parameters) test_rtree_for_box(parameters, std::allocator()); } -#endif +#endif // BOOST_GEOMETRY_INDEX_TEST_RTREE_HPP