Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r64113 - in sandbox/geometry: boost/geometry/algorithms boost/geometry/algorithms/detail/overlay boost/geometry/core boost/geometry/geometries/adapted boost/geometry/geometries/concepts libs/geometry/example libs/geometry/test/algorithms libs/geometry/test/geometries libs/geometry/test/multi/algorithms
From: barend.gehrels_at_[hidden]
Date: 2010-07-17 16:26:31


Author: barendgehrels
Date: 2010-07-17 16:26:29 EDT (Sat, 17 Jul 2010)
New Revision: 64113
URL: http://svn.boost.org/trac/boost/changeset/64113

Log:
Removed traits::append_point.
The library now used std::back_insert_iterator everywhere
Text files modified:
   sandbox/geometry/boost/geometry/algorithms/append.hpp | 47 +++++++++++-----------
   sandbox/geometry/boost/geometry/algorithms/convert.hpp | 4 -
   sandbox/geometry/boost/geometry/algorithms/correct.hpp | 5 -
   sandbox/geometry/boost/geometry/algorithms/detail/overlay/copy_segments.hpp | 5 -
   sandbox/geometry/boost/geometry/algorithms/detail/overlay/traverse.hpp | 5 +
   sandbox/geometry/boost/geometry/algorithms/transform.hpp | 9 +++
   sandbox/geometry/boost/geometry/core/container_access.hpp | 29 -------------
   sandbox/geometry/boost/geometry/geometries/adapted/boost_array_as_linestring.hpp | 11 -----
   sandbox/geometry/boost/geometry/geometries/concepts/linestring_concept.hpp | 20 +++------
   sandbox/geometry/boost/geometry/geometries/concepts/ring_concept.hpp | 12 ++---
   sandbox/geometry/libs/geometry/example/x04_wxwidgets_world_mapper.cpp | 83 +++++++++++++--------------------------
   sandbox/geometry/libs/geometry/test/algorithms/append.cpp | 3 +
   sandbox/geometry/libs/geometry/test/algorithms/distance.cpp | 6 ++
   sandbox/geometry/libs/geometry/test/algorithms/simplify.cpp | 10 ++++
   sandbox/geometry/libs/geometry/test/geometries/Jamfile.v2 | 6 --
   sandbox/geometry/libs/geometry/test/geometries/custom_linestring.cpp | 12 -----
   sandbox/geometry/libs/geometry/test/multi/algorithms/multi_simplify.cpp | 1
   17 files changed, 97 insertions(+), 171 deletions(-)

Modified: sandbox/geometry/boost/geometry/algorithms/append.hpp
==============================================================================
--- sandbox/geometry/boost/geometry/algorithms/append.hpp (original)
+++ sandbox/geometry/boost/geometry/algorithms/append.hpp 2010-07-17 16:26:29 EDT (Sat, 17 Jul 2010)
@@ -11,7 +11,6 @@
 
 #include <boost/range.hpp>
 
-#include <boost/type_traits/remove_const.hpp>
 
 #include <boost/geometry/core/access.hpp>
 #include <boost/geometry/core/container_access.hpp>
@@ -34,55 +33,58 @@
 struct append_point
 {
     static inline void apply(Geometry& geometry, Point const& point,
- int ring_index, int multi_index)
+ int = 0, int = 0)
     {
- traits::append_point<Geometry, Point>::apply(geometry, point,
- ring_index, multi_index);
+ typename geometry::point_type<Geometry>::type copy;
+ copy_coordinates(point, copy);
+ *(std::back_inserter(geometry)++) = copy;
     }
 };
 
+
 template <typename Geometry, typename Range>
 struct append_range
 {
     typedef typename boost::range_value<Range>::type point_type;
 
     static inline void apply(Geometry& geometry, Range const& range,
- int ring_index, int multi_index)
+ int = 0, int = 0)
     {
         for (typename boost::range_iterator<Range const>::type
             it = boost::begin(range);
              it != boost::end(range);
              ++it)
         {
- traits::append_point<Geometry, point_type>::apply(geometry, *it,
- ring_index, multi_index);
+ append_point<Geometry, point_type>::apply(geometry, *it);
         }
     }
 };
 
+
 template <typename Polygon, typename Point>
-struct point_to_poly
+struct point_to_polygon
 {
     typedef typename ring_type<Polygon>::type range_type;
 
     static inline void apply(Polygon& polygon, Point const& point,
- int ring_index, int )
+ int ring_index, int = 0)
     {
         if (ring_index == -1)
         {
- traits::append_point<range_type, Point>::apply(
- exterior_ring(polygon), point, -1, -1);
+ append_point<range_type, Point>::apply(
+ exterior_ring(polygon), point);
         }
         else if (ring_index < int(num_interior_rings(polygon)))
         {
- traits::append_point<range_type, Point>::apply(
- interior_rings(polygon)[ring_index], point, -1, -1);
+ append_point<range_type, Point>::apply(
+ interior_rings(polygon)[ring_index], point);
         }
     }
 };
 
+
 template <typename Polygon, typename Range>
-struct range_to_poly
+struct range_to_polygon
 {
     typedef typename ring_type<Polygon>::type ring_type;
 
@@ -92,16 +94,17 @@
         if (ring_index == -1)
         {
             append_range<ring_type, Range>::apply(
- exterior_ring(polygon), range, -1, -1);
+ exterior_ring(polygon), range);
         }
         else if (ring_index < int(num_interior_rings(polygon)))
         {
             append_range<ring_type, Range>::apply(
- interior_rings(polygon)[ring_index], range, -1, -1);
+ interior_rings(polygon)[ring_index], range);
         }
     }
 };
 
+
 }} // namespace detail::append
 #endif // DOXYGEN_NO_DETAIL
 
@@ -131,14 +134,12 @@
 
 template <typename Polygon, typename TagRange, typename Range>
 struct append<polygon_tag, TagRange, Polygon, Range>
- : detail::append::range_to_poly<Polygon, Range> {};
+ : detail::append::range_to_polygon<Polygon, Range> {};
 
 template <typename Polygon, typename Point>
 struct append<polygon_tag, point_tag, Polygon, Point>
- : detail::append::point_to_poly<Polygon, Point> {};
+ : detail::append::point_to_polygon<Polygon, Point> {};
 
-// Multi-linestring and multi-polygon might either implement traits
-// or use standard...
 
 } // namespace dispatch
 #endif // DOXYGEN_NO_DISPATCH
@@ -159,17 +160,17 @@
 {
     concept::check<Geometry>();
 
- typedef typename boost::remove_const<Geometry>::type ncg_type;
-
     dispatch::append
         <
             typename tag<Geometry>::type,
             typename tag<RoP>::type,
- ncg_type,
+ Geometry,
             RoP
>::apply(geometry, range_or_point, ring_index, multi_index);
 }
 
+
 }} // namespace boost::geometry
 
+
 #endif // BOOST_GEOMETRY_ALGORITHMS_APPEND_HPP

Modified: sandbox/geometry/boost/geometry/algorithms/convert.hpp
==============================================================================
--- sandbox/geometry/boost/geometry/algorithms/convert.hpp (original)
+++ sandbox/geometry/boost/geometry/algorithms/convert.hpp 2010-07-17 16:26:29 EDT (Sat, 17 Jul 2010)
@@ -141,9 +141,7 @@
             it != boost::end(source);
             ++it)
         {
- typename geometry::point_type<Ring2>::type p;
- geometry::copy_coordinates(*it, p);
- geometry::append(destination, p);
+ geometry::append(destination, *it);
         }
     }
 };

Modified: sandbox/geometry/boost/geometry/algorithms/correct.hpp
==============================================================================
--- sandbox/geometry/boost/geometry/algorithms/correct.hpp (original)
+++ sandbox/geometry/boost/geometry/algorithms/correct.hpp 2010-07-17 16:26:29 EDT (Sat, 17 Jul 2010)
@@ -120,10 +120,7 @@
 
             if (disjoint && (s == closed))
             {
- // Close it
- point_type first;
- geometry::copy_coordinates(*boost::begin(r), first);
- *(std::back_inserter(r)++) = first;
+ geometry::append(r, *boost::begin(r));
             }
             if (! disjoint && geometry::closure<Ring>::value != closed)
             {

Modified: sandbox/geometry/boost/geometry/algorithms/detail/overlay/copy_segments.hpp
==============================================================================
--- sandbox/geometry/boost/geometry/algorithms/detail/overlay/copy_segments.hpp (original)
+++ sandbox/geometry/boost/geometry/algorithms/detail/overlay/copy_segments.hpp 2010-07-17 16:26:29 EDT (Sat, 17 Jul 2010)
@@ -76,10 +76,7 @@
                 << geometry::get<0>(*it) << ", " << geometry::get<1>(*it) << ")"
                 << std::endl;
 #endif
- typename geometry::point_type<RangeOut>::type p;
- geometry::copy_coordinates(*it, p);
- //current_output.push_back(p);
- *(std::back_inserter(current_output)++) = p;
+ geometry::append(current_output, *it);
         }
     }
 };

Modified: sandbox/geometry/boost/geometry/algorithms/detail/overlay/traverse.hpp
==============================================================================
--- sandbox/geometry/boost/geometry/algorithms/detail/overlay/traverse.hpp (original)
+++ sandbox/geometry/boost/geometry/algorithms/detail/overlay/traverse.hpp 2010-07-17 16:26:29 EDT (Sat, 17 Jul 2010)
@@ -123,7 +123,8 @@
         ip = boost::begin(turns) + info.enriched.next_ip_index;
         seg_id = info.seg_id;
     }
- *(std::back_inserter(current_output)++) = ip->point;
+
+ geometry::append(current_output, ip->point);
 }
 
 
@@ -300,7 +301,7 @@
                         set_visited_for_contine(*it, *iit);
 
                         typename boost::range_value<Rings>::type current_output;
- *(std::back_inserter(current_output)++) = it->point;
+ geometry::append(current_output, it->point);
 
                         turn_iterator current = it;
                         turn_operation_iterator_type current_iit = iit;

Modified: sandbox/geometry/boost/geometry/algorithms/transform.hpp
==============================================================================
--- sandbox/geometry/boost/geometry/algorithms/transform.hpp (original)
+++ sandbox/geometry/boost/geometry/algorithms/transform.hpp 2010-07-17 16:26:29 EDT (Sat, 17 Jul 2010)
@@ -78,6 +78,7 @@
     }
 };
 
+
 template <typename Box1, typename Box2, typename Strategy>
 struct transform_box
 {
@@ -117,6 +118,7 @@
     }
 };
 
+
 template
 <
     typename PointOut,
@@ -142,12 +144,12 @@
         {
             return false;
         }
- *out = point_out;
- ++out;
+ *out++ = point_out;
     }
     return true;
 }
 
+
 template <typename Polygon1, typename Polygon2, typename Strategy>
 struct transform_polygon
 {
@@ -312,6 +314,7 @@
     return transform_type::apply(geometry1, geometry2, strategy);
 }
 
+
 /*!
     \brief Transforms from one geometry to another geometry using a strategy
     \ingroup transform
@@ -331,6 +334,8 @@
     return transform(geometry1, geometry2, strategy);
 }
 
+
 }} // namespace boost::geometry
 
+
 #endif // BOOST_GEOMETRY_ALGORITHMS_TRANSFORM_HPP

Modified: sandbox/geometry/boost/geometry/core/container_access.hpp
==============================================================================
--- sandbox/geometry/boost/geometry/core/container_access.hpp (original)
+++ sandbox/geometry/boost/geometry/core/container_access.hpp 2010-07-17 16:26:29 EDT (Sat, 17 Jul 2010)
@@ -27,10 +27,8 @@
 
 
 /*!
-\brief Traits class, optional, might be implemented to clear a geometry
-\details If a geometry type should not use the std ".clear()"
- then it can specialize the "use_std" traits class to false,
- it should then implement (a.o.) clear
+\brief Traits class to clear a geometry
+\note Might be obsolete as well...
 \ingroup traits
 \par Geometries:
     - linestring
@@ -48,29 +46,6 @@
 };
 
 
-/*!
-\brief Traits class, optional, might be implemented to append a point
-\details If a geometry type should not use the std "push_back"
- then it can specialize the "use_std" traits class to false,
- it should then implement (a.o.) append_point
-\ingroup traits
-\par Geometries:
- - linestring
- - linear_ring
-\par Specializations should provide:
- - apply
- */
-template <typename Geometry, typename Point>
-struct append_point
-{
- static inline void apply(Geometry& geometry, Point const& point, int , int )
- {
- typename geometry::point_type<Geometry>::type copy;
- copy_coordinates(point, copy);
- geometry.push_back(copy);
- }
-};
-
 
 } // namespace traits
 

Modified: sandbox/geometry/boost/geometry/geometries/adapted/boost_array_as_linestring.hpp
==============================================================================
--- sandbox/geometry/boost/geometry/geometries/adapted/boost_array_as_linestring.hpp (original)
+++ sandbox/geometry/boost/geometry/geometries/adapted/boost_array_as_linestring.hpp 2010-07-17 16:26:29 EDT (Sat, 17 Jul 2010)
@@ -51,17 +51,6 @@
         }
     };
 
- // Append does not exist for a boost::array
- // It should not be used, and therefore: throw
- template <typename Point, std::size_t PointCount, typename Point2>
- struct append_point< boost::array<Point, PointCount>, Point2 >
- {
- static inline void apply(boost::array<Point, PointCount>& ,
- Point const& , int , int )
- {
- }
- };
-
 }
 #endif
 

Modified: sandbox/geometry/boost/geometry/geometries/concepts/linestring_concept.hpp
==============================================================================
--- sandbox/geometry/boost/geometry/geometries/concepts/linestring_concept.hpp (original)
+++ sandbox/geometry/boost/geometry/geometries/concepts/linestring_concept.hpp 2010-07-17 16:26:29 EDT (Sat, 17 Jul 2010)
@@ -34,21 +34,16 @@
 The linestring concept is defined as following:
 - there must be a specialization of traits::tag defining linestring_tag as type
 - it must behave like a Boost.Range
-- either it can behave like the std library, having push_back and clear
-- or it can implement a mechanism for clearing and adding points:
- - there can be a specialization of traits::use_std class indicating
- that it does not use the standard library (for modifications)
- - there should then be a specialization of traits::clear
- to make a linestring empty
- - there should then be a specialization of traits::append_point
- to add a point to a linestring
+- it must implement a std::back_insert_iterator
+ - either by implementing push_back
+ - or by specializing std::back_insert_iterator
 
-\note to fulfil the concepts, no traits class has to be specialized to
+\note to fulfill the concepts, no traits class has to be specialized to
 define the point type.
 
 \par Example:
 
-A custom linestring, defining the necessary specializations to fulfil to the concept.
+A custom linestring, defining the necessary specializations to fulfill to the concept.
 
 Suppose that the following linestring is defined:
 \dontinclude doxygen_5.cpp
@@ -79,6 +74,8 @@
     BOOST_CONCEPT_ASSERT( (concept::Point<point_type>) );
     BOOST_CONCEPT_ASSERT( (boost::RandomAccessRangeConcept<Geometry>) );
 
+ // There should be a std::back_insert_iterator, to add points
+ typedef std::back_insert_iterator<Geometry> back_inserter;
 
 public :
 
@@ -87,9 +84,6 @@
         // Check if it can be modified
         Geometry* ls;
         traits::clear<Geometry>::apply(*ls);
-
- point_type* p;
- traits::append_point<Geometry, point_type>::apply(*ls, *p, -1, -1);
     }
 #endif
 };

Modified: sandbox/geometry/boost/geometry/geometries/concepts/ring_concept.hpp
==============================================================================
--- sandbox/geometry/boost/geometry/geometries/concepts/ring_concept.hpp (original)
+++ sandbox/geometry/boost/geometry/geometries/concepts/ring_concept.hpp 2010-07-17 16:26:29 EDT (Sat, 17 Jul 2010)
@@ -35,11 +35,10 @@
 - it must behave like a Boost.Range
 - there can optionally be a specialization of traits::point_order defining the
   order or orientation of its points, clockwise or counterclockwise.
-- either it can behave like the std library, having pushback
-- or it can implement a mechanism for clearing and adding points.
- This is the same as the for the concept Linestring, and described there.
+- it must implement a std::back_insert_iterator
+ (This is the same as the for the concept Linestring, and described there)
 
-\note to fulfil the concepts, no traits class has to be specialized to
+\note to fulfill the concepts, no traits class has to be specialized to
 define the point type.
 */
 template <typename Geometry>
@@ -51,6 +50,8 @@
     BOOST_CONCEPT_ASSERT( (concept::Point<point_type>) );
     BOOST_CONCEPT_ASSERT( (boost::RandomAccessRangeConcept<Geometry>) );
 
+ // There should be a std::back_insert_iterator, to add points
+ typedef std::back_insert_iterator<Geometry> back_inserter;
 
 public :
 
@@ -58,9 +59,6 @@
     {
         Geometry* ring;
         traits::clear<Geometry>::apply(*ring);
-
- point_type* p;
- traits::append_point<Geometry, point_type>::apply(*ring, *p, -1, -1);
     }
 #endif
 };

Modified: sandbox/geometry/libs/geometry/example/x04_wxwidgets_world_mapper.cpp
==============================================================================
--- sandbox/geometry/libs/geometry/example/x04_wxwidgets_world_mapper.cpp (original)
+++ sandbox/geometry/libs/geometry/example/x04_wxwidgets_world_mapper.cpp 2010-07-17 16:26:29 EDT (Sat, 17 Jul 2010)
@@ -41,38 +41,49 @@
 #include "wx/graphics.h"
 #endif
 
-// wxWidgets draws using wxPoint*
-// So we have to make a wxPoint* array compatible with Boost.Range
-// and with std::back_inserter
-// So we define an iterator pair:
-typedef std::pair<wxPoint*,wxPoint*> wxPointPointerPair;
+
+typedef boost::geometry::multi_polygon<boost::geometry::polygon_2d> country_type;
 
 // Adapt wxWidgets points to Boost.Geometry points such that they can be used
 // in e.g. transformations (see below)
 BOOST_GEOMETRY_REGISTER_POINT_2D(wxPoint, int, cs::cartesian, x, y)
 BOOST_GEOMETRY_REGISTER_POINT_2D(wxRealPoint, double, cs::cartesian, x, y)
 
-// Done explicitly below to implement "clear"
-//BOOST_GEOMETRY_REGISTER_RING(wxPointPointerPair);
 
+// wxWidgets draws using wxPoint*, so we HAVE to use that.
+// Therefore have to make a wxPoint* array
+// 1) compatible with Boost.Geometry
+// 2) compatible with Boost.Range (required by Boost.Geometry)
+// 3) compatible with std::back_inserter (required by Boost.Geometry)
 
+// For compatible 2):
+typedef std::pair<wxPoint*,wxPoint*> wxPointPointerPair;
 
-// Implement a draft back_insert_iterator for such a pair of pointers
-// It might exist somewhere in Boost yet.
+// For compatible 1):
+BOOST_GEOMETRY_REGISTER_RING(wxPointPointerPair);
+
+
+// For compatible 3):
+// Specialize back_insert_iterator for the wxPointPointerPair
+// (has to be done within "namespace std")
 namespace std
 {
 
 template <>
 class back_insert_iterator<wxPointPointerPair>
+ : public std::iterator<std::output_iterator_tag, void, void, void, void>
 {
 public:
+
+ typedef wxPointPointerPair container_type;
+
     explicit back_insert_iterator(wxPointPointerPair& x)
         : current(boost::begin(x))
         , end(boost::end(x))
     {}
 
- back_insert_iterator<wxPointPointerPair>&
- operator=(const wxPoint& value)
+ inline back_insert_iterator<wxPointPointerPair>&
+ operator=(wxPoint const& value)
     {
         // Check if not passed beyond
         if (current != end)
@@ -83,57 +94,22 @@
     }
 
     // Boiler-plate
- back_insert_iterator<wxPointPointerPair>& operator*() { return *this; }
- back_insert_iterator<wxPointPointerPair>& operator++() { return *this; }
- back_insert_iterator<wxPointPointerPair>& operator++(int) { return *this; }
-
- typedef wxPointPointerPair container_type;
- typedef output_iterator_tag iterator_category;
- typedef void value_type;
- typedef void difference_type;
- typedef void pointer;
- typedef void reference;
+ inline back_insert_iterator<wxPointPointerPair>& operator*() { return *this; }
+ inline back_insert_iterator<wxPointPointerPair>& operator++() { return *this; }
+ inline back_insert_iterator<wxPointPointerPair>& operator++(int) { return *this; }
 
-protected:
+private:
     boost::range_iterator<wxPointPointerPair>::type current, end;
 };
 
-}
-
-
-namespace boost { namespace geometry { namespace traits
-{
- template <>
- struct tag< wxPointPointerPair > { typedef ring_tag type; };
-
- template <>
- struct use_std< wxPointPointerPair >
- {
- static bool const value = false;
- };
-
- template <>
- struct clear< wxPointPointerPair >
- {
- static inline void apply(wxPointPointerPair& ls)
- {
- // Empty on purpose, fixed size, cannot be cleared
- !!! /*TODO*/ 0;
- }
- };
-
-}}} // namespace boost::geometry::traits
-
-
-
-typedef boost::geometry::multi_polygon<boost::geometry::polygon_2d> country_type;
+} // namespace std
 
 
 // ----------------------------------------------------------------------------
 // Read an ASCII file containing WKT's
 // ----------------------------------------------------------------------------
 template <typename Geometry, typename Box>
-void read_wkt(std::string const& filename, std::vector<Geometry>& geometries, Box& box)
+inline void read_wkt(std::string const& filename, std::vector<Geometry>& geometries, Box& box)
 {
     std::ifstream cpp_file(filename.c_str());
     if (cpp_file.is_open())
@@ -154,9 +130,6 @@
 }
 
 
-
-
-
 // ----------------------------------------------------------------------------
 class HelloWorldFrame: public wxFrame
 {

Modified: sandbox/geometry/libs/geometry/test/algorithms/append.cpp
==============================================================================
--- sandbox/geometry/libs/geometry/test/algorithms/append.cpp (original)
+++ sandbox/geometry/libs/geometry/test/algorithms/append.cpp 2010-07-17 16:26:29 EDT (Sat, 17 Jul 2010)
@@ -22,6 +22,7 @@
 #include <boost/geometry/geometries/adapted/boost_array_as_linestring.hpp>
 
 #include <test_common/test_point.hpp>
+#include <test_geometries/wrapped_boost_array.hpp>
 
 template <typename G>
 void test_geometry()
@@ -47,6 +48,8 @@
     test_geometry<std::vector<P> >();
     test_geometry<std::deque<P> >();
     //test_geometry<std::list<P> >();
+
+ test_geometry<test::wrapped_boost_array<P, 2> >();
 }
 
 int test_main(int, char* [])

Modified: sandbox/geometry/libs/geometry/test/algorithms/distance.cpp
==============================================================================
--- sandbox/geometry/libs/geometry/test/algorithms/distance.cpp (original)
+++ sandbox/geometry/libs/geometry/test/algorithms/distance.cpp 2010-07-17 16:26:29 EDT (Sat, 17 Jul 2010)
@@ -18,7 +18,9 @@
 #include <boost/geometry/geometries/adapted/boost_array_as_linestring.hpp>
 #include <boost/geometry/geometries/adapted/c_array_cartesian.hpp>
 #include <boost/geometry/geometries/adapted/tuple_cartesian.hpp>
+
 #include <test_common/test_point.hpp>
+#include <test_geometries/wrapped_boost_array.hpp>
 
 
 namespace bg = boost::geometry;
@@ -171,9 +173,11 @@
     test_geometry<P, bg::linestring<P> >("POINT(1 3)", "LINESTRING(1 1,4 4)", sqrt(2.0));
     test_geometry<P, bg::linestring<P> >("POINT(3 1)", "LINESTRING(1 1,4 4)", sqrt(2.0));
 
- // This one COMPILES but should THROW
+ // This one COMPILES but should THROW - because boost::array is not variably sized
     //test_geometry<P, boost::array<P, 2> >("POINT(3 1)", "LINESTRING(1 1,4 4)", sqrt(2.0));
 
+ test_geometry<P, test::wrapped_boost_array<P, 2> >("POINT(3 1)", "LINESTRING(1 1,4 4)", sqrt(2.0));
+
     test_geometry<bg::linestring<P>, P>("LINESTRING(1 1,4 4)", "POINT(1 3)", sqrt(2.0));
 }
 

Modified: sandbox/geometry/libs/geometry/test/algorithms/simplify.cpp
==============================================================================
--- sandbox/geometry/libs/geometry/test/algorithms/simplify.cpp (original)
+++ sandbox/geometry/libs/geometry/test/algorithms/simplify.cpp 2010-07-17 16:26:29 EDT (Sat, 17 Jul 2010)
@@ -13,6 +13,7 @@
 #include <boost/geometry/geometries/geometries.hpp>
 
 
+#include <test_geometries/wrapped_boost_array.hpp>
 #include <test_common/test_point.hpp>
 
 
@@ -33,6 +34,14 @@
         "LINESTRING(0 0,5 5,7 5,10 10)",
         "LINESTRING(0 0,5 5,7 5,10 10)", 1.0);
 
+ test_geometry<test::wrapped_boost_array<P, 10> >(
+ "LINESTRING(0 0,5 5,7 5,10 10)",
+ "LINESTRING(0 0,5 5,7 5,10 10)", 1.0);
+
+ test_geometry<boost::geometry::linear_ring<P> >(
+ "POLYGON((4 0,8 2,8 7,4 9,0 7,0 2,2 1,4 0))",
+ "POLYGON((4 0,8 2,8 7,4 9,0 7,0 2,4 0))", 1.0);
+
     test_geometry<boost::geometry::polygon<P> >(
         "POLYGON((4 0,8 2,8 7,4 9,0 7,0 2,2 1,4 0))",
         "POLYGON((4 0,8 2,8 7,4 9,0 7,0 2,4 0))", 1.0);
@@ -77,6 +86,7 @@
 {
     // Integer compiles, but simplify-process fails (due to distances)
     //test_all<boost::geometry::point_xy<int> >();
+
     test_all<boost::geometry::point_xy<float> >();
     test_all<boost::geometry::point_xy<double> >();
 

Modified: sandbox/geometry/libs/geometry/test/geometries/Jamfile.v2
==============================================================================
--- sandbox/geometry/libs/geometry/test/geometries/Jamfile.v2 (original)
+++ sandbox/geometry/libs/geometry/test/geometries/Jamfile.v2 2010-07-17 16:26:29 EDT (Sat, 17 Jul 2010)
@@ -15,12 +15,6 @@
         : # target name
         custom_linestring_test_fail_clear
     ]
- [ compile-fail custom_linestring.cpp
- : # requirements
- <define>TEST_FAIL_APPEND
- : # target name
- custom_linestring_test_fail_append
- ]
     [ run custom_linestring.cpp ]
     [ run segment.cpp ]
     ;

Modified: sandbox/geometry/libs/geometry/test/geometries/custom_linestring.cpp
==============================================================================
--- sandbox/geometry/libs/geometry/test/geometries/custom_linestring.cpp (original)
+++ sandbox/geometry/libs/geometry/test/geometries/custom_linestring.cpp 2010-07-17 16:26:29 EDT (Sat, 17 Jul 2010)
@@ -60,18 +60,6 @@
     };
 #endif
 
-#if ! defined(TEST_FAIL_APPEND)
- template <typename P>
- struct append_point< custom_linestring2<P>, P>
- {
- static inline void apply(custom_linestring2<P>& geometry,
- const P& point, int ring_index, int multi_index)
- {
- // does not use push-back but something else.
- geometry.insert(geometry.end(), point);
- }
- };
-#endif
 }}} // namespace boost::geometry::traits
 
 // ----------------------------------------------------------------------------

Modified: sandbox/geometry/libs/geometry/test/multi/algorithms/multi_simplify.cpp
==============================================================================
--- sandbox/geometry/libs/geometry/test/multi/algorithms/multi_simplify.cpp (original)
+++ sandbox/geometry/libs/geometry/test/multi/algorithms/multi_simplify.cpp 2010-07-17 16:26:29 EDT (Sat, 17 Jul 2010)
@@ -7,7 +7,6 @@
 
 #include <geometry_test_common.hpp>
 
-#include <boost/geometry/algorithms/simplify.hpp>
 #include <boost/geometry/multi/algorithms/simplify.hpp>
 
 #include <boost/geometry/extensions/gis/io/wkt/wkt.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