Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r83664 - trunk/libs/geometry/test/index/rtree
From: adam.wulkiewicz_at_[hidden]
Date: 2013-03-31 10:01:04


Author: awulkiew
Date: 2013-03-31 10:01:03 EDT (Sun, 31 Mar 2013)
New Revision: 83664
URL: http://svn.boost.org/trac/boost/changeset/83664

Log:
rtree test: std::copy() replaced by other implementation because of MSVC warnings.
Text files modified:
   trunk/libs/geometry/test/index/rtree/test_rtree.hpp | 12 ++++++++++--
   1 files changed, 10 insertions(+), 2 deletions(-)

Modified: trunk/libs/geometry/test/index/rtree/test_rtree.hpp
==============================================================================
--- trunk/libs/geometry/test/index/rtree/test_rtree.hpp (original)
+++ trunk/libs/geometry/test/index/rtree/test_rtree.hpp 2013-03-31 10:01:03 EDT (Sun, 31 Mar 2013)
@@ -988,6 +988,13 @@
     //TODO - test SWAP
 }
 
+template <typename I, typename O>
+inline void my_copy(I first, I last, O out)
+{
+ for ( ; first != last ; ++first, ++out )
+ *out = *first;
+}
+
 // rtree creation and insertion
 
 template <typename Rtree, typename Value, typename Box>
@@ -1007,7 +1014,8 @@
     }
     {
         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<Value> output;
         t.query(bgi::intersects(qbox), std::back_inserter(output));
@@ -1440,4 +1448,4 @@
     test_rtree_for_box<Point>(parameters, std::allocator<int>());
 }
 
-#endif
+#endif // BOOST_GEOMETRY_INDEX_TEST_RTREE_HPP


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk