From 61d331f45698fb518383526d3efbc3c28ef5c62b Mon Sep 17 00:00:00 2001 From: Simon Giraudot Date: Wed, 18 Mar 2020 09:11:41 +0100 Subject: [PATCH] Fix for_each --- STL_Extension/include/CGAL/for_each.h | 8 ++++---- STL_Extension/include/CGAL/iterator.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/STL_Extension/include/CGAL/for_each.h b/STL_Extension/include/CGAL/for_each.h index 819e95f063d..e0ac595c753 100644 --- a/STL_Extension/include/CGAL/for_each.h +++ b/STL_Extension/include/CGAL/for_each.h @@ -41,7 +41,7 @@ void for_each (RangeRef range, { functor(r); } - catch (stop_for_each) + catch (const stop_for_each&) { break; } @@ -70,7 +70,7 @@ void for_each (RangeRef range, { functor (*(iterators[i])); } - catch (stop_for_each) + catch (const stop_for_each&) { return; } @@ -78,7 +78,7 @@ void for_each (RangeRef range, } template -void for_each (const RangeRef range, +void for_each (RangeRef range, const std::function::type>::reference)>& functor, const Parallel_tag&, @@ -94,7 +94,7 @@ void for_each (const RangeRef range, { functor (*(range.begin() + i)); } - catch (stop_for_each) + catch (const stop_for_each&) { return; } diff --git a/STL_Extension/include/CGAL/iterator.h b/STL_Extension/include/CGAL/iterator.h index 4875fb69aa5..8424af8487f 100644 --- a/STL_Extension/include/CGAL/iterator.h +++ b/STL_Extension/include/CGAL/iterator.h @@ -1474,7 +1474,7 @@ dispatch_or_drop_output(O... o) // Trick to select iterator or const_iterator depending on the range constness template -struct Range_iterator_type { typedef int type; }; // Should generate errors +struct Range_iterator_type; template struct Range_iterator_type { typedef typename RangeRef::iterator type; }; template