[geometry] weird define in adapted fusion sequence

Hi, Trying (again) to use Boost.Geometry with coordinates with Boost.Units (BTW, what is the status of the compatibility between geometry and units?) I found the following macro definition in boost/ geometry/geometries/adapted/boost_fusion.hpp // Convenience registration macro to bind a Fusion sequence to a CS #define BOOST_GEOMETRY_REGISTER_BOOST_FUSION_CS(CoordinateSystem) \ namespace boost { namespace geometry { namespace traits { \ template <typename Sequence> \ struct coordinate_system \ < \ Sequence, \ typename boost::enable_if \ < \ fusion_adapt_detail::is_fusion_sequence<Sequence> \ >::type \ > \ { typedef cs::cartesian type; }; \ }}} Unless I am missing something, the definition of the macro does not depend on the parameter "CoordinateSystem" !. To make the situation even more confusing the manual's example (http://www.boost.org/doc/ libs/1_47_0/libs/geometry/doc/html/geometry/reference/adapted/ boost_fusion.html) uses the struct as the parameter and not the coordinate system ! Unless I am wrong the last lines of the definition of BOOST_GEOMETRY_REGISTER_BOOST_FUSION_CS should be: { typedef CoordinateSystem type; }; \ }}} and the manual should be updated accordingly. E.g. the example should read BOOST_FUSION_ADAPT_STRUCT(sample_point, (double, x) (double, y) (double, z)) BOOST_GEOMETRY_REGISTER_BOOST_FUSION_CS(cs::cartesian) Am I missing something? Thanks, Alfredo

Hi alf.
2011/8/15 alfC
You right. I already report to Trac. https://svn.boost.org/trac/boost/ticket/5744

Hi Alfredo, On 15-8-2011 12:59, alfC wrote:
Oops, this sounds more as supporting confusion than supporting fusion ;-) . Sorry for the error. Both points are fixed in Trunk. They were a bit related (if the first was correct, the second would never have occurred) but that is no excuse. Thanks for the report, Akira thanks for the Ticket. Regards, Barend
participants (3)
-
Akira Takahashi
-
alfC
-
Barend Gehrels