fixes for old boost

This commit is contained in:
Maxime Gimeno 2018-11-29 12:02:15 +01:00
parent 46545fd1b1
commit 63c35e7e28
9 changed files with 41 additions and 10 deletions

View File

@ -27,9 +27,10 @@ typedef CT::Vertices_in_constraint_iterator Vertices_in_constraint_iterator;
typedef CT::Points_in_constraint_iterator Points_in_constraint_iterator;
typedef PS::Stop_below_count_ratio_threshold Stop;
typedef PS::Squared_distance_cost Cost;
#endif
int main(int argc, char* argv[])
{
#if BOOST_VERSION >= 105600
std::ifstream ifs( (argc==1)?"data/polygon.wkt":argv[1]);
CT ct;
Polygon_with_holes_2 P;
@ -53,8 +54,8 @@ int main(int argc, char* argv[])
++vit)
std::cout << *vit << std::endl;
}
#endif
return 0;
}
#endif

View File

@ -14,9 +14,10 @@ typedef CGAL::Polygon_2<K> Polygon_2;
typedef CGAL::Polygon_with_holes_2<K> Polygon_with_holes_2;
typedef PS::Stop_below_count_ratio_threshold Stop;
typedef PS::Squared_distance_cost Cost;
#endif
int main(int argc, char* argv[])
{
#if BOOST_VERSION >= 105600
std::ifstream ifs( (argc==1)?"data/polygon.wkt":argv[1]);
Polygon_with_holes_2 polygon;
CGAL::read_polygon_WKT(ifs, polygon);
@ -26,8 +27,6 @@ int main(int argc, char* argv[])
std::cout.precision(12);
CGAL::write_polygon_WKT(std::cout, polygon) << std::endl;
#endif
return 0;
}
#endif

View File

@ -14,9 +14,10 @@ typedef K::Point_2 Point_2;
typedef std::deque<Point_2> Polyline_2;
typedef PS::Stop_above_cost_threshold Stop;
typedef PS::Squared_distance_cost Cost;
#endif
int main(int argc, char* argv[])
{
#if BOOST_VERSION >= 105600
Polyline_2 polyline;
std::ifstream ifs( (argc==1)?"data/polyline.wkt":argv[1]);
CGAL::read_linestring_WKT(ifs, polyline);
@ -28,6 +29,6 @@ int main(int argc, char* argv[])
for(std::size_t i=0; i < result.size(); ++i){
std::cout << result[i] << std::endl;
}
#endif
return 0;
}
#endif

View File

@ -38,6 +38,11 @@ int main(int argc, char* argv[])
BOOST_FOREACH(const Point& p, l)
std::cout<<p<<std::endl;
}
return 0;
}
#else
int main()
{
return 0;
}
#endif

View File

@ -29,5 +29,11 @@ int main(int argc, char* argv[])
std::cout<<p<<std::endl;
}
is.close();
return 0;
}
#else
int main()
{
return 0;
}
#endif

View File

@ -45,4 +45,9 @@ int main(int argc, char* argv[])
}
return 0;
}
#else
int main()
{
return 0;
}
#endif

View File

@ -43,4 +43,9 @@ int main(int argc, char* argv[])
}
return 0;
}
#else
int main()
{
return 0;
}
#endif

View File

@ -67,5 +67,9 @@ int main()
std::cout<<"WKT reading test passed."<<std::endl;
return 0;
}
#else
int main()
{
return 0;
}
#endif

View File

@ -202,4 +202,9 @@ int main()
std::cout<<"WKT writing test passed."<<std::endl;
return 0;
}
#else
int main()
{
return 0;
}
#endif