On Sun, Aug 25, 2013 at 8:19 AM, Lepere Renaud
My Ring structure is very simple : typedef std::vector< Point > Points; struct Ring { Points points; };
I'm not sure you're making it more complex than it needs to be. It seems like a Ring *IS* a Vector of Points. And/or the *application* of that type. So why not run with the type you've already defined?
typedef std::vector<Point> points_vector; //... points_vector my_ring;
Or:
typedefin std::vector<Point> ring_type;
Then you don't have to implement anything else, no other iterators: vector is already done for you.
Yes, but the problem was that i would have prefer not to change the existing structure (not as simple as the one in the example). After implementing clear, resize and push_back as suggested by Barend (an example is here http://www.boost.org/doc/libs/1_54_0/libs/geometry/example/c08_custom_non_st...), it works !
So more of an adapter pattern. Fair enough.
Thanks for your help
Renaud _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users