<div dir="ltr">Here is the full example I came up with. I am using visual studio (tried 2010, 2012, and 2013). For completeness I am attaching a file with the polygon definition (test.txt).<br><br>#include "stdafx.h"<br> #include <string><br>#include <fstream><br>#include <streambuf><br>#include <boost/geometry.hpp><br>#include "boost/geometry/geometry.hpp"<br>#include <boost/geometry/extensions/gis/latlong/point_ll.hpp><br> #include <boost/geometry/io/io.hpp><br><br>namespace bg = boost::geometry;<br>using namespace std;<br><br>typedef bg::model::ll::point<> point;<br>typedef bg::model::polygon<point> polygon;<br><br>int _tmain(int argc, _TCHAR* argv[])<br> {<br> polygon poly;<br> std::string str;<br><br> std::ifstream t("c:\\temp\\test.txt");<br><br> t.seekg(0, std::ios::end); <br> str.reserve(t.tellg());<br> t.seekg(0, std::ios::beg);<br><br> str.assign((std::istreambuf_iterator<char>(t)),<br> std::istreambuf_iterator<char>());<br><br> bg::read_wkt(str, poly);<br><br> const bg::latitude<double> lat_out(37.69311);<br> const bg::longitude<double> lon_out(-122.13865);<br> point p_out(lat_out, lon_out);<br> <br> bg::distance(poly, p_out); // This fails to compile for some reason.<br><br> return 0;<br>}<br><br><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Aug 9, 2014 at 12:12 AM, Menelaos Karavelas <span dir="ltr"><<a href="mailto:menelaos.karavelas@gmail.com" target="_blank">menelaos.karavelas@gmail.com</a>></span> wrote:<br> <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> <div bgcolor="#FFFFFF" text="#000000"> Hi Branimir.<div><div class="h5"><br> <br> <div>On 09/08/2014 05:26 πμ, Branimir Betov wrote:<br> </div> <blockquote type="cite"> <div dir="ltr"> <div> <div> <div> <div> <div>Hi,<br> <br> </div> I am trying to figure out what is wrong with my code and am stuck, so I thought someone might help. The code used to work in 1.55 and in 1.56 no longer compiles; I am at a loss what might be wrong. I am using the GIS extension from the develop-1.56 branch.<br> <br> </div> Here is the relevant snippet:<br> <br> typedef bg::model::ll::point<> point;<br> typedef bg::model::polygon<point> polygon;<br> <br> polygon poly;<br> <br> bg::read_wkt(str, poly);<br> <br> const bg::latitude<double> lat_out(37.69311);<br> const bg::longitude<double> lon_out(-122.13865);<br> point p_out(lat_out, lon_out);<br> <br> bg::distance(p_out, poly); // It fails to compile right here. <br> <br> <br> </div> Does anyone have any suggestions?<br> <br> </div> </div> </div> </blockquote> <br></div></div> Would it be possible to provide a minimal complete example that fails?<br> <br> Thanks a lot.<br> <br> - m.<br> <br> <br> <blockquote type="cite"> <div dir="ltr"> <div>Thank you,<br> </div> Branimir<br> <div> <div> <div><br> </div> </div> </div> </div> <br> <fieldset></fieldset> <br> <pre>_______________________________________________ Geometry mailing list <a href="mailto:Geometry@lists.boost.org" target="_blank">Geometry@lists.boost.org</a> <a href="http://lists.boost.org/mailman/listinfo.cgi/geometry" target="_blank">http://lists.boost.org/mailman/listinfo.cgi/geometry</a> </pre> </blockquote> <br> </div> <br>_______________________________________________<br> Geometry mailing list<br> <a href="mailto:Geometry@lists.boost.org">Geometry@lists.boost.org</a><br> <a href="http://lists.boost.org/mailman/listinfo.cgi/geometry" target="_blank">http://lists.boost.org/mailman/listinfo.cgi/geometry</a><br> <br></blockquote></div><br></div>