From 2591e6cc7d6aef289c25eb45cab41d64f544a8ab Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Fri, 3 Jul 2015 17:27:46 +0200 Subject: [PATCH] Fix a miscompilation by clang-3.6.x Fix issue #139 --- STL_Extension/include/CGAL/Compact_container.h | 4 ++-- STL_Extension/include/CGAL/vector.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/STL_Extension/include/CGAL/Compact_container.h b/STL_Extension/include/CGAL/Compact_container.h index 8b96bce8ba5..1891678e830 100644 --- a/STL_Extension/include/CGAL/Compact_container.h +++ b/STL_Extension/include/CGAL/Compact_container.h @@ -1147,7 +1147,7 @@ namespace internal { Nullptr_t CGAL_assertion_code(n)) { CGAL_assertion( n == NULL); - return &*rhs == NULL; + return rhs == CC_iterator(); } template < class DSC, bool Const > @@ -1156,7 +1156,7 @@ namespace internal { Nullptr_t CGAL_assertion_code(n)) { CGAL_assertion( n == NULL); - return &*rhs != NULL; + return rhs != CC_iterator(); } } // namespace internal diff --git a/STL_Extension/include/CGAL/vector.h b/STL_Extension/include/CGAL/vector.h index 8be7fde982c..9e671720814 100644 --- a/STL_Extension/include/CGAL/vector.h +++ b/STL_Extension/include/CGAL/vector.h @@ -196,7 +196,7 @@ protected: } } void deallocate() { - if ( &*start_) + if ( start_ != iterator() ) alloc.deallocate( &*start_, end_of_storage - start_ ); }