
Barend Gehrels wrote:
The segment type provided by default is indeed holding references and it does that on purpose. That avoids copying points all the time. AFAIK the segment intersection algorithm does not use those references, it refers to segments in the generic way, using get<0,0>(segment) etc. It makes no difference if you're using a segment by reference or a segment by value.
Maybe so, but that still doesn't help when you want to have a collection of segments. For example, in my testing I wanted to calculate the intersection between a huge number of segments, and with GGL's you can't do this: typedef boost::tuple<double, double> point_type; typedef ggl::segment<point_type> segment_type; //! segment_type does not model the default constructible concept. std::vector< segment_type > segments; Brandon