achieve backwardcompatibility to the code not to the documentation

This commit is contained in:
Andreas Fabri 2014-12-12 17:28:44 +01:00
parent d29268032f
commit ca9e8d4948
2 changed files with 5 additions and 7 deletions

View File

@ -63,9 +63,7 @@ The intersection tag as defined in `Tr`.
/*!
The identifier of a polyline constraint.
The class is model of `Assignable`, `CopyConstructible`, `DefaultConstructible`, and `Comparable`. For reasons of backward compatibility of
functions that returned `std::pair<Vertex_handle,Vertex_handle>` instead of `Constraint_id`,
the id class has a conversion operator to `std::pair<Vertex_handle,Vertex_handle>`.
The class is model of `Assignable`, `CopyConstructible`, `DefaultConstructible`, and `Comparable`.
*/
typedef unspecified_type Constraint_id;

View File

@ -114,13 +114,13 @@ public:
Vertex_list* vl_ptr() const {return second;}
operator std::pair<Vertex_handle, Vertex_handle>()
operator std::pair<std::pair<Vertex_handle, Vertex_handle>,Vertex_list*>()
{
if (second!=NULL){
return std::make_pair(second->front().vertex(),
second->back().vertex());
return std::make_pair(std::make_pair(second->front().vertex(),
second->back().vertex()),second);
}
return std::make_pair(Vertex_handle(),Vertex_handle());
return std::make_pair(std::make_pair(Vertex_handle(),Vertex_handle()),second);
}
bool operator == (const Constraint_id& other) const