mirror of https://github.com/CGAL/cgal
Merge pull request #4036 from afabri/Triangulation_2-fix_issue_4010-FD
Triangulation_2: Do not use C++11
This commit is contained in:
commit
54bd82ea93
|
|
@ -4,33 +4,32 @@
|
||||||
#include <CGAL/Constrained_triangulation_plus_2.h>
|
#include <CGAL/Constrained_triangulation_plus_2.h>
|
||||||
|
|
||||||
|
|
||||||
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
|
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
|
||||||
typedef CGAL::Polygon_2<K> Polygon_2;
|
typedef CGAL::Polygon_2<K> Polygon_2;
|
||||||
typedef CGAL::Exact_intersections_tag Itag_;
|
typedef CGAL::Exact_intersections_tag Itag_;
|
||||||
typedef CGAL::Constrained_Delaunay_triangulation_2<K,CGAL::Default, Itag_> CDT;
|
typedef CGAL::Constrained_Delaunay_triangulation_2<K,CGAL::Default, Itag_> CDT;
|
||||||
typedef CGAL::Constrained_triangulation_plus_2<CDT> CDTP;
|
typedef CGAL::Constrained_triangulation_plus_2<CDT> CDTP;
|
||||||
|
|
||||||
typedef CDTP::Point Point;
|
typedef CDTP::Point Point;
|
||||||
typedef CDTP::Constraint_id Cid;
|
|
||||||
typedef CDTP::Vertex_handle Vertex_handle;
|
typedef CDTP::Vertex_handle Vertex_handle;
|
||||||
|
typedef CDTP::Constraint_id Constraint_id;
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
CDTP cdtp;
|
CDTP cdtp;
|
||||||
|
|
||||||
Vertex_handle handle1=cdtp.insert(Point(0,0));
|
Vertex_handle handle1 = cdtp.insert(Point(0,0));
|
||||||
Vertex_handle handle2=cdtp.insert(Point(0,10));
|
cdtp.insert(Point(0,10));
|
||||||
Vertex_handle handle3=cdtp.insert(Point(10,10));
|
Vertex_handle handle3 = cdtp.insert(Point(10,10));
|
||||||
Vertex_handle handle4=cdtp.insert(Point(10,0));
|
cdtp.insert(Point(10,0));
|
||||||
|
|
||||||
auto id = cdtp.insert_constraint(handle1,handle3);
|
cdtp.insert_constraint(handle1,handle3);
|
||||||
|
|
||||||
cdtp.remove_constraint(handle1,handle3);
|
cdtp.remove_constraint(handle1,handle3);
|
||||||
|
|
||||||
auto lastConstraintId=cdtp.insert_constraint(handle1,handle3);
|
auto lastConstraintId = cdtp.insert_constraint(handle1,handle3);
|
||||||
|
|
||||||
if (lastConstraintId == nullptr){
|
if (lastConstraintId == Constraint_id()){
|
||||||
std::cout << "problem" << std::endl;
|
std::cout << "problem" << std::endl;
|
||||||
assert(false);
|
assert(false);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue