Boost logo

Geometry :

Subject: Re: [geometry] Boost.Geometry models UDLs
From: Barend Gehrels (barend_at_[hidden])
Date: 2014-02-24 16:10:05


Hi Bruno,

Bruno Lalande wrote On 24-2-2014 10:46:
> Hi,
>
> Sorry for the late reaction. Good idea indeed. Not sure we need Proto,
> given the limited number of operators will be using (just one AFAICT).
> We should try without first. Also, Proto is a very complex library and
> trying to manually do its job first is usually a good way to
> understand it.

Sure - I mentioned Proto just to spread the knowlegde of similar
experimental UDL that I had done. Not really to advocate the usage, I
agree it is complex.

But besides that I think using chaining operators is a little more
convenient, think of boost::tuple_list_of of Boost.Assign which is IMO
more convenient to use than compile-time strings, and looks better.

|"((1 0, 1 3, 3 3, 3 0, 1 0))"_ring
vs.
|ring_type ring = tuple_list_of(16, 1)(15,2)(14, 3)(13,4)(12,3.14)(1,6);

Such things are easy to create (also without proto).

Regards, Barend



Geometry list run by mateusz at loskot.net