diff --git a/index/test/geometry_index_test_common.hpp b/index/test/geometry_index_test_common.hpp index aeecc4df3..4a2ac615c 100644 --- a/index/test/geometry_index_test_common.hpp +++ b/index/test/geometry_index_test_common.hpp @@ -19,11 +19,10 @@ #endif // _MSC_VER #include -#define BOOST_GEOMETRY_INDEX_DETAIL_ENABLE_DEBUG_INTERFACE -#include #include +namespace boost { namespace geometry { namespace index {}}} namespace bgi = boost::geometry::index; #endif // GEOMETRY_TEST_GEOMETRY_INDEX_TEST_COMMON_HPP diff --git a/index/test/rtree/exceptions/test_throwing_node.hpp b/index/test/rtree/exceptions/test_throwing_node.hpp index 609c6dae2..f1b0ac233 100644 --- a/index/test/rtree/exceptions/test_throwing_node.hpp +++ b/index/test/rtree/exceptions/test_throwing_node.hpp @@ -154,8 +154,20 @@ class allocators::type >::other { + typedef typename Allocator::template rebind< + Value + >::other value_allocator_type; + public: - typedef typename Allocator::size_type size_type; + typedef Allocator allocator_type; + + typedef Value value_type; + typedef value_type & reference; + typedef const value_type & const_reference; + typedef typename value_allocator_type::size_type size_type; + typedef typename value_allocator_type::difference_type difference_type; + typedef typename value_allocator_type::pointer pointer; + typedef typename value_allocator_type::const_pointer const_pointer; typedef typename Allocator::template rebind< typename node::type diff --git a/index/test/rtree/test_rtree.hpp b/index/test/rtree/test_rtree.hpp index 109b22e55..5543804bd 100644 --- a/index/test/rtree/test_rtree.hpp +++ b/index/test/rtree/test_rtree.hpp @@ -10,12 +10,18 @@ #ifndef BOOST_GEOMETRY_INDEX_TEST_RTREE_HPP #define BOOST_GEOMETRY_INDEX_TEST_RTREE_HPP -#include - #include #include #include +#include + +#define BOOST_GEOMETRY_INDEX_DETAIL_ENABLE_DEBUG_INTERFACE +// TEST +//#define BOOST_GEOMETRY_INDEX_DETAIL_EXPERIMENTAL +//#define BOOST_GEOMETRY_INDEX_DETAIL_ENABLE_TYPE_ERASED_ITERATORS +#include + #include #include @@ -668,6 +674,17 @@ void spatial_query(Rtree & rtree, Predicates const& pred, std::vector con std::copy(rtree.qbegin(pred), rtree.qend(pred), std::back_inserter(output3)); compare_outputs(rtree, output3, expected_output); + +#ifdef BOOST_GEOMETRY_INDEX_DETAIL_ENABLE_TYPE_ERASED_ITERATORS + { + typedef typename Rtree::const_query_iterator QI; + QI first = rtree.qbegin(pred); + QI last = rtree.qend(pred); + std::vector output4; + std::copy(first, last, std::back_inserter(output4)); + compare_outputs(rtree, output4, expected_output); + } +#endif #endif } @@ -937,6 +954,17 @@ void nearest_query_k(Rtree const& rtree, std::vector const& input, Point std::copy(rtree.qbegin(bgi::nearest(pt, k)), rtree.qend(bgi::nearest(pt, k)), std::back_inserter(output3)); compare_nearest_outputs(rtree, output3, expected_output, pt, greatest_distance); + +#ifdef BOOST_GEOMETRY_INDEX_DETAIL_ENABLE_TYPE_ERASED_ITERATORS + { + typedef typename Rtree::const_query_iterator QI; + QI first = rtree.qbegin(bgi::nearest(pt, k)); + QI last = rtree.qend(bgi::nearest(pt, k)); + std::vector output4; + std::copy(first, last, std::back_inserter(output4)); + compare_nearest_outputs(rtree, output4, expected_output, pt, greatest_distance); + } +#endif #endif }