Boost logo

Geometry :

Subject: Re: [geometry] -std=c++0x and Boost Geometry 1.55
From: Adam Wulkiewicz (adam.wulkiewicz_at_[hidden])
Date: 2014-08-22 05:52:43


Hunk wrote:
> Hello,
>
> i try to use the new c++ standart with boost geometry but i get following
> error
>
> /opt/boost/include/boost/geometry/algorithms/detail/recalculate.hpp:145:24:
> Fehler: »it_source« wurde in diesem Gültigkeitsbereich nicht definiert
> BOOST_AUTO_TPL(it_source, boost::begin(rings_source));
> ^
> /opt/boost/include/boost/geometry/algorithms/detail/recalculate.hpp:146:24:
> Fehler: »it_dest« wurde in diesem Gültigkeitsbereich nicht definiert
> BOOST_AUTO_TPL(it_dest, boost::begin(rings_dest));
>
> It is possible to fix this? With boost 1.56 it runs well, but i need boost
> 1.55 because some dependencies

Are you sure you're using Boost 1.55 official release? recalculate.hpp
doesn't exist in 1.55. Isn't it some version of develop or 1.56-beta or
some mix of 1.55 and develop? First, I'd check this.

Since I'm not sure which version you're using, maybe it's some
development version, is there
#include <boost/typeof/typeof.hpp>
included at the top of recalculate.hpp file?
If not, you may check if adding it will fix the problem.

If any of the above didn't work you could define those variables without
the use of BOOST_AUTO_TPL, something like this should do the trick as a
replacement of lines 145, 146:

typename boost::range_const_iterator<
     typename interior_return_type<Polygon2 const>::type
>::type it_source = boost::begin(rings_source);

typename boost::range_iterator<
     typename interior_return_type<Polygon1>::type
>::type it_dest = boost::begin(rings_dest);

Regards,
Adam


Geometry list run by mateusz at loskot.net