Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] BOOST_FOREACH.

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] BOOST_FOREACH.


Chronological Thread 
  • From: Nico Kruithof <>
  • To: "" <>
  • Subject: Re: [cgal-discuss] BOOST_FOREACH.
  • Date: Fri, 5 Jul 2013 06:10:27 +0200

Hi Sylvain,

yes, I was looking for this function. I thought that I had heard of it being somewhere, but I couldn't find it. It would be nice to have these functions in the 2d/3d triangulations as well.

Nico


On Fri, Jul 5, 2013 at 3:22 AM, Sylvain Pion <> wrote:
Some work has been done, for example Triangulation_data_structure_3 has .vertices() (resp. .cells()) returning Vertex_range (resp. Cell_range).  But it did not get extended to the Triangulation_3 level yet, apparently.  Besides BOOST_FOREACH, the new for loop in C++11 would also benefit from this.


2013/7/4 Nico Kruithof <>
Yes, but that still is more typing. I was hoping that there were CGAL functions for that would do that for me. I'll just stick with the normal for loop. It's just syntactical sugar.

Nico


On Thu, Jul 4, 2013 at 6:16 PM, Cody Rose <> wrote:
You could probably use a boost iterator range as an adaptor: http://www.boost.org/doc/libs/1_54_0/libs/range/doc/html/range/reference/utilities/iterator_range.html

Cody


On 7/4/2013 7:53 AM, Nico Kruithof wrote:
Hi,

I like BOOST_FOREACH but as I far as know, it needs a container and not a range. What would be the most convenient way to use it with the vertices of a triangulation where you only have the ..._begin() and ..._end() members?

--
Nico Kruithof




--
Nico Kruithof




--
Nico Kruithof
nghk.nl



Archive powered by MHonArc 2.6.18.

Top of Page