Introduces a GCAL_NO_ASSERTIONS_BOOL macro

This macro is always defined. Its value will be true when assertions are defined
and false when assertions are not defined. This macro can then be used in place
of a true false constant, such as is needed for CGAL_NOEXCEPT.
This commit is contained in:
Giles Bathgate 2016-01-08 20:31:59 +00:00
parent f6dfeba815
commit f0ac236713
5 changed files with 10 additions and 4 deletions

View File

@ -410,7 +410,7 @@ namespace CGAL {
{}
/// Destructor.
~CMap_non_basic_iterator() CGAL_NOEXCEPT(CGAL_NO_ASSERTIONS)
~CMap_non_basic_iterator() CGAL_NOEXCEPT(CGAL_NO_ASSERTIONS_BOOL)
{
CGAL_destructor_assertion( this->mmark_number!=Map::INVALID_MARK );
if (this->mmap->get_number_of_times_mark_reserved

View File

@ -470,4 +470,10 @@ typedef const void * Nullptr_t; // Anticipate C++0x's std::nullptr_t
#define CGAL_NOEXCEPT(x)
#endif
#ifndef CGAL_NO_ASSERTIONS
# define CGAL_NO_ASSERTIONS_BOOL false
#else
# define CGAL_NO_ASSERTIONS_BOOL true
#endif
#endif // CGAL_CONFIG_H

View File

@ -51,7 +51,7 @@ public:
return reference_count_ != 0;
}
virtual ~Ref_counted_base() CGAL_NOEXCEPT(CGAL_NO_ASSERTIONS)
virtual ~Ref_counted_base() CGAL_NOEXCEPT(CGAL_NO_ASSERTIONS_BOOL)
{
CGAL_destructor_assertion(reference_count_==0);
}

View File

@ -195,7 +195,7 @@ public:
CGAL_assertion_code(check_protocoll = 0;)
}
~Polyhedron_incremental_builder_3() CGAL_NOEXCEPT(CGAL_NO_ASSERTIONS)
~Polyhedron_incremental_builder_3() CGAL_NOEXCEPT(CGAL_NO_ASSERTIONS_BOOL)
{
CGAL_destructor_assertion( check_protocoll == 0);
}

View File

@ -195,7 +195,7 @@ public:
CGAL_assertion_code(check_protocoll = 0;)
}
~Enriched_polyhedron_incremental_builder_3() CGAL_NOEXCEPT(CGAL_NO_ASSERTIONS)
~Enriched_polyhedron_incremental_builder_3() CGAL_NOEXCEPT(CGAL_NO_ASSERTIONS_BOOL)
{
CGAL_destructor_assertion( check_protocoll == 0);
}