diff --git a/Combinatorial_map/doc/Combinatorial_map/Concepts/CombinatorialMap.h b/Combinatorial_map/doc/Combinatorial_map/Concepts/CombinatorialMap.h
index eca858bb1d7..be87736f655 100644
--- a/Combinatorial_map/doc/Combinatorial_map/Concepts/CombinatorialMap.h
+++ b/Combinatorial_map/doc/Combinatorial_map/Concepts/CombinatorialMap.h
@@ -893,33 +893,33 @@ void reverse_orientation_connected_component(Dart_handle adart);
/*!
Reserves a new mark. Returns its
-index. Returns -1 if there is no more available free mark.
+index. If there is no more available free mark, throw the exception Exception_no_more_available_mark.
*/
-int get_new_mark() const;
+size_type get_new_mark() const;
/*!
Returns true iff `m` is a reserved mark of the combinatorial map.
\pre 0\f$ \leq\f$m\f$ <\f$\ref CombinatorialMap::NB_MARKS "NB_MARKS".
*/
-bool is_reserved(int m) const;
+bool is_reserved(size_type m) const;
/*!
Returns true iff `*dh` is marked for `m`.
\pre \ref CombinatorialMap::is_reserved "is_reserved(m)" and `*dh`\f$ \in\f$`darts()`.
*/
-bool is_marked(Dart_const_handle dh, int m) const;
+bool is_marked(Dart_const_handle dh, size_type m) const;
/*!
Marks `*dh` for `m`.
\pre \ref CombinatorialMap::is_reserved "is_reserved(m)" and `*dh`\f$ \in\f$`darts()`.
*/
-void mark(Dart_const_handle dh, int m) const;
+void mark(Dart_const_handle dh, size_type m) const;
/*!
Unmarks `*dh` for the mark `m`.
\pre \ref CombinatorialMap::is_reserved "is_reserved(m)" and `*dh`\f$ \in\f$`darts()`.
*/
-void unmark(Dart_const_handle dh, int m) const;
+void unmark(Dart_const_handle dh, size_type m) const;
/*!
Inverse the mark `m` for all the darts of the combinatorial map.
@@ -927,31 +927,31 @@ All the marked darts become unmarked and all the unmarked darts
become marked.
\pre \ref CombinatorialMap::is_reserved "is_reserved(m)".
*/
-void negate_mark(int m) const;
+void negate_mark(size_type m) const;
/*!
Unmarks all the darts of the combinatorial map for `m`.
\pre \ref CombinatorialMap::is_reserved "is_reserved(m)".
*/
-void unmark_all(int m) const;
+void unmark_all(size_type m) const;
/*!
Returns the number of marked darts for `m`.
\pre \ref CombinatorialMap::is_reserved "is_reserved(m)".
*/
-size_type number_of_marked_darts(int m) const;
+size_type number_of_marked_darts(size_type m) const;
/*!
Return the number of unmarked darts for `m`.
\pre \ref CombinatorialMap::is_reserved "is_reserved(m)".
*/
-size_type number_of_unmarked_darts(int m) const;
+size_type number_of_unmarked_darts(size_type m) const;
/*!
Frees mark `m`.
\pre \ref CombinatorialMap::is_reserved "is_reserved(m)".
*/
-void free_mark(int m) const;
+void free_mark(size_type m) const;
/// @}
}; /* end CombinatorialMap */
diff --git a/Combinatorial_map/examples/Combinatorial_map/map_3_marks.cpp b/Combinatorial_map/examples/Combinatorial_map/map_3_marks.cpp
index 23d7515c94d..38ae3e75795 100644
--- a/Combinatorial_map/examples/Combinatorial_map/map_3_marks.cpp
+++ b/Combinatorial_map/examples/Combinatorial_map/map_3_marks.cpp
@@ -7,17 +7,25 @@
typedef CGAL::Combinatorial_map<3> CMap_3;
typedef CMap_3::Dart_handle Dart_handle;
+typedef CMap_3::size_type size_type;
+
+typedef CMap_3::Exception_no_more_available_mark Exception_no_more_available_mark;
+
int main()
{
CMap_3 cm;
-
+
// 1) Reserve a mark.
- int mark = cm.get_new_mark();
- if ( mark==-1 )
- {
- std::cerr<<"No more free mark, exit."<mmap->free_mark(mcell_mark_number);
this->mmap->free_mark(this->mmark_number);
- this->mcell_mark_number = -1; // To avoid basic class to try to unmark darts.
- this->mmark_number = -1; // To avoid basic class to try to unmark darts.
+ this->mcell_mark_number = Map::INVALID_MARK; // To avoid basic class to try to unmark darts.
+ this->mmark_number = Map::INVALID_MARK; // To avoid basic class to try to unmark darts.
}
/// Copy constructor.
@@ -163,7 +163,7 @@ namespace CGAL {
private:
/// A mark used to mark treated cells.
- int mcell_mark_number;
+ typename Map::size_type mcell_mark_number;
};
//****************************************************************************
/* Class CMap_cell_iterator