diff --git a/Combinatorial_map/include/CGAL/Combinatorial_map_iterators_base.h b/Combinatorial_map/include/CGAL/Combinatorial_map_iterators_base.h index d000154f253..78d14522eb9 100644 --- a/Combinatorial_map/include/CGAL/Combinatorial_map_iterators_base.h +++ b/Combinatorial_map/include/CGAL/Combinatorial_map_iterators_base.h @@ -389,7 +389,7 @@ namespace CGAL { {} /// Destructor. - ~CMap_non_basic_iterator() noexcept(!CGAL_assertions) + ~CMap_non_basic_iterator() noexcept(!CGAL_ASSERTIONS_ENABLED) { CGAL_destructor_assertion( this->mmark_number!=Map::INVALID_MARK ); if (this->mmap->get_number_of_times_mark_reserved diff --git a/Documentation/doc/Documentation/Developer_manual/Chapter_checks.txt b/Documentation/doc/Documentation/Developer_manual/Chapter_checks.txt index 601c7cc4354..1a6fb78e4cb 100644 --- a/Documentation/doc/Documentation/Developer_manual/Chapter_checks.txt +++ b/Documentation/doc/Documentation/Developer_manual/Chapter_checks.txt @@ -243,7 +243,7 @@ and \cgalCite{cgal:a-esgc-98} (also available at https://www.boost.org/community/exception_safety.html). Any destructor which might throw an exception, including a destructor which uses the `CGAL_destructor_assertion` macro, should be marked with the -`noexcept(!CGAL_assertions)`. +`noexcept(!CGAL_ASSERTIONS_ENABLED)`. \section secchecks_req_and_rec Requirements and recommendations diff --git a/Nef_3/include/CGAL/Nef_3/K3_tree.h b/Nef_3/include/CGAL/Nef_3/K3_tree.h index d79b4e8892d..6a3a62da2cf 100644 --- a/Nef_3/include/CGAL/Nef_3/K3_tree.h +++ b/Nef_3/include/CGAL/Nef_3/K3_tree.h @@ -445,7 +445,7 @@ friend std::ostream& operator<< } /* -~Node() noexcept(!CGAL_assertions) +~Node() noexcept(!CGAL_ASSERTIONS_ENABLED) { CGAL_NEF_TRACEN("~Node: deleting node..."); CGAL_destructor_assertion_catch( @@ -1119,7 +1119,7 @@ bool update( Node_handle node, return (left_updated || right_updated); } /* -~K3_tree() noexcept(!CGAL_assertions) +~K3_tree() noexcept(!CGAL_ASSERTIONS_ENABLED) { CGAL_NEF_TRACEN("~K3_tree: deleting root..."); CGAL_destructor_assertion_catch( diff --git a/Nef_3/include/CGAL/Nef_3/SNC_point_locator.h b/Nef_3/include/CGAL/Nef_3/SNC_point_locator.h index fdf9d8da189..10fdcd01a9b 100644 --- a/Nef_3/include/CGAL/Nef_3/SNC_point_locator.h +++ b/Nef_3/include/CGAL/Nef_3/SNC_point_locator.h @@ -126,7 +126,7 @@ public: virtual void add_vertex(Vertex_handle) {} - virtual ~SNC_point_locator() noexcept(!CGAL_assertions) + virtual ~SNC_point_locator() noexcept(!CGAL_ASSERTIONS_ENABLED) { CGAL_NEF_CLOG(""); CGAL_NEF_CLOG("construction_time: "<(0)) {} - Handle(const Handle& x) noexcept(!(CGAL_preconditions || CGAL_assertions)) + Handle(const Handle& x) noexcept(!(CGAL_PRECONDITIONS_ENABLED || CGAL_ASSERTIONS_ENABLED)) { CGAL_precondition( x.PTR != static_cast(0) ); PTR = x.PTR; @@ -67,7 +67,7 @@ class Handle } Handle& - operator=(const Handle& x) noexcept(!CGAL_preconditions) + operator=(const Handle& x) noexcept(!CGAL_PRECONDITIONS_ENABLED) { CGAL_precondition( x.PTR != static_cast(0) ); x.PTR->count++; diff --git a/STL_Extension/include/CGAL/Handle_for.h b/STL_Extension/include/CGAL/Handle_for.h index ce0d0b3296f..71ac6739e36 100644 --- a/STL_Extension/include/CGAL/Handle_for.h +++ b/STL_Extension/include/CGAL/Handle_for.h @@ -102,7 +102,7 @@ public: ptr_ = p; } - Handle_for(const Handle_for& h) noexcept(!CGAL_assertions) + Handle_for(const Handle_for& h) noexcept(!CGAL_ASSERTIONS_ENABLED) : ptr_(h.ptr_) { CGAL_assume (ptr_->count > 0); @@ -110,7 +110,7 @@ public: } Handle_for& - operator=(const Handle_for& h) noexcept(!CGAL_assertions) + operator=(const Handle_for& h) noexcept(!CGAL_ASSERTIONS_ENABLED) { Handle_for tmp = h; swap(tmp); diff --git a/STL_Extension/include/CGAL/Multiset.h b/STL_Extension/include/CGAL/Multiset.h index 5fb92ffd693..3ef21028cd6 100644 --- a/STL_Extension/include/CGAL/Multiset.h +++ b/STL_Extension/include/CGAL/Multiset.h @@ -590,7 +590,7 @@ public: /*! * Destructor. [takes O(n) operations] */ - virtual ~Multiset () noexcept(!CGAL_assertions); + virtual ~Multiset () noexcept(!CGAL_ASSERTIONS_ENABLED); /*! * Assignment operator. [takes O(n) operations] @@ -1565,7 +1565,7 @@ Multiset::Multiset (const Self& t // Destructor. // template -Multiset::~Multiset () noexcept(!CGAL_assertions) +Multiset::~Multiset () noexcept(!CGAL_ASSERTIONS_ENABLED) { if (UseCompactContainer::value) return; diff --git a/STL_Extension/include/CGAL/assertions.h b/STL_Extension/include/CGAL/assertions.h index 5908a4a9495..f3de2c1e8b2 100644 --- a/STL_Extension/include/CGAL/assertions.h +++ b/STL_Extension/include/CGAL/assertions.h @@ -77,7 +77,7 @@ inline bool possibly(Uncertain c); // ---------- #if defined(CGAL_NO_ASSERTIONS) -# define CGAL_assertions false +# define CGAL_ASSERTIONS_ENABLED false # define CGAL_assertion(EX) (static_cast(0)) # define CGAL_destructor_assertion(EX) (static_cast(0)) # define CGAL_destructor_assertion_catch(CODE) CODE @@ -91,7 +91,7 @@ inline bool possibly(Uncertain c); # define CGAL_assume_code(CODE) CGAL_assertion_code(CODE) # endif // not def CGAL_ASSUME #else // no CGAL_NO_ASSERTIONS -# define CGAL_assertions true +# define CGAL_ASSERTIONS_ENABLED true # define CGAL_assertion(EX) \ (CGAL::possibly(EX)?(static_cast(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__)) # if __cpp_lib_uncaught_exceptions || ( _MSVC_LANG >= 201703L ) // C++17 @@ -193,12 +193,12 @@ inline bool possibly(Uncertain c); // ------------- #if defined(CGAL_NO_PRECONDITIONS) -# define CGAL_preconditions false +# define CGAL_PRECONDITIONS_ENABLED false # define CGAL_precondition(EX) (static_cast(0)) # define CGAL_precondition_msg(EX,MSG) (static_cast(0)) # define CGAL_precondition_code(CODE) #else -# define CGAL_preconditions true +# define CGAL_PRECONDITIONS_ENABLED true # define CGAL_precondition(EX) \ (CGAL::possibly(EX)?(static_cast(0)): ::CGAL::precondition_fail( # EX , __FILE__, __LINE__)) # define CGAL_precondition_msg(EX,MSG) \ diff --git a/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Straight_skeleton_aux.h b/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Straight_skeleton_aux.h index ea762999ca8..e22b0bbe422 100644 --- a/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Straight_skeleton_aux.h +++ b/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Straight_skeleton_aux.h @@ -164,7 +164,7 @@ private: Ref_counted_base& operator=( Ref_counted_base const &); protected: Ref_counted_base(): mCount(0) {} - virtual ~Ref_counted_base() noexcept(!CGAL_assertions) {} + virtual ~Ref_counted_base() noexcept(!CGAL_ASSERTIONS_ENABLED) {} public: void AddRef() const { ++mCount; } void Release() const diff --git a/Stream_support/include/CGAL/IO/VRML/VRML_2_ostream.h b/Stream_support/include/CGAL/IO/VRML/VRML_2_ostream.h index 0eb0fc4b90f..d664810e8ee 100644 --- a/Stream_support/include/CGAL/IO/VRML/VRML_2_ostream.h +++ b/Stream_support/include/CGAL/IO/VRML/VRML_2_ostream.h @@ -30,7 +30,7 @@ class VRML_2_ostream public: VRML_2_ostream() : m_os(nullptr) {} VRML_2_ostream(std::ostream& o) : m_os(&o) { header(); } - ~VRML_2_ostream() noexcept(!CGAL_assertions) + ~VRML_2_ostream() noexcept(!CGAL_ASSERTIONS_ENABLED) { CGAL_destructor_assertion_catch( close(); diff --git a/Surface_mesher/archive/include/CGAL/builder.h b/Surface_mesher/archive/include/CGAL/builder.h index 94000bddf48..7984469e674 100644 --- a/Surface_mesher/archive/include/CGAL/builder.h +++ b/Surface_mesher/archive/include/CGAL/builder.h @@ -175,7 +175,7 @@ public: CGAL_assertion_code(check_protocoll = 0;) } - ~Enriched_polyhedron_incremental_builder_3() noexcept(!CGAL_assertions) + ~Enriched_polyhedron_incremental_builder_3() noexcept(!CGAL_ASSERTIONS_ENABLED) { CGAL_destructor_assertion( check_protocoll == 0); }