| ------------------------------------------------------------------------ | r58172 | lrineau | 2010-08-20 11:21:30 +0200 (Fri, 20 Aug 2010) | 3 lines | Changed paths: | M /branches/CGAL-3.7-branch/Arithmetic_kernel/test/Arithmetic_kernel/CMakeLists.txt | | Fix buggy CMake logic: the GMP_arithmetic_kernel.cpp must me configured | only once. | | ------------------------------------------------------------------------ | r58173 | lrineau | 2010-08-20 11:25:35 +0200 (Fri, 20 Aug 2010) | 2 lines | Changed paths: | M /branches/CGAL-3.7-branch/BGL/examples/BGL_arrangement_2 | M /branches/CGAL-3.7-branch/BGL/examples/BGL_arrangement_2/dual.cpp | M /branches/CGAL-3.7-branch/BGL/examples/BGL_arrangement_2/primal.cpp | | Fix warning about deprecated included headers. | | ------------------------------------------------------------------------ | r58174 | lrineau | 2010-08-20 11:39:25 +0200 (Fri, 20 Aug 2010) | 3 lines | Changed paths: | M /branches/CGAL-3.7-branch/Boolean_set_operations_2/test/Boolean_set_operations_2/test_polygon_validation.cpp | | Modify the test file so that the check function do not display warnings | that result in a 'w' in the testsuite. | | ------------------------------------------------------------------------ | r58175 | lrineau | 2010-08-20 11:45:26 +0200 (Fri, 20 Aug 2010) | 9 lines | Changed paths: | M /branches/CGAL-3.7-branch/GraphicsView/demo/Bounding_volumes/Bounding_volumes.cpp | | Fix warnings: | | test/Bounding_volumes_Demo/Bounding_volumes.cpp: In constructor `MainWindow::MainWindow()': | test/Bounding_volumes_Demo/Bounding_volumes.cpp:71: warning: `MainWindow::P' will be initialized after | test/Bounding_volumes_Demo/Bounding_volumes.cpp:120: warning: base `CGAL::Qt::DemosMainWindow' | test/Bounding_volumes_Demo/Bounding_volumes.cpp:120: warning: when initialized here | test/Bounding_volumes_Demo/Bounding_volumes.cpp: In member function `void MainWindow::update()': | test/Bounding_volumes_Demo/Bounding_volumes.cpp:247: warning: comparison between signed and unsigned integer expressions | | ------------------------------------------------------------------------ | r58177 | lrineau | 2010-08-20 11:47:06 +0200 (Fri, 20 Aug 2010) | 3 lines | Changed paths: | M /branches/CGAL-3.7-branch/Min_circle_2/include/CGAL/Min_circle_2.h | | Fix warning: | include/CGAL/Min_circle_2.h:197: warning: comparison between signed and unsigned integer expressions | | ------------------------------------------------------------------------ | r58178 | lrineau | 2010-08-20 11:49:09 +0200 (Fri, 20 Aug 2010) | 4 lines | Changed paths: | M /branches/CGAL-3.7-branch/STL_Extension/include/CGAL/assertions.h | | Avoid a warning if NDEBUG and CGAL_NDEBUG are both defined: | | include/CGAL/assertions.h:59:1: warning: "CGAL_NDEBUG" redefined | | ------------------------------------------------------------------------ | r58179 | lrineau | 2010-08-20 11:50:54 +0200 (Fri, 20 Aug 2010) | 8 lines | Changed paths: | M /branches/CGAL-3.7-branch/GraphicsView/include/CGAL/Qt/GraphicsViewCircularArcInput.h | | Fix a warning: | | include/CGAL/Qt/GraphicsViewCircularArcInput.h: In constructor 'CGAL::Qt::GraphicsViewCircularArcInput<K>::GraphicsViewCircularArcInput(QObject*, QGraphicsScene*) [with K = CGAL::Circular_kernel_2<CGAL::Cartesian<CGAL::Quotient<CGAL::MP_Float> >, CGAL::Algebraic_kernel_for_circles_2_2<CGAL::Quotient<CGAL::MP_Float> > >]': | cmake/platforms/i686_Linux-2.6_g++-4.1.2_CentOS-5.1/test/Circular_kernel_2_Demo/Circular_kernel_2.cpp:107: instantiated from here | include/CGAL/Qt/GraphicsViewCircularArcInput.h:73: warning: 'CGAL::Qt::GraphicsViewCircularArcInput<CGAL::Circular_kernel_2<CGAL::Cartesian<CGAL::Quotient<CGAL::MP_Float> >, CGAL::Algebraic_kernel_for_circles_2_2<CGAL::Quotient<CGAL::MP_Float> > > >::scene_' will be initialized after | include/CGAL/Qt/GraphicsViewCircularArcInput.h:68: warning: 'int CGAL::Qt::GraphicsViewCircularArcInput<CGAL::Circular_kernel_2<CGAL::Cartesian<CGAL::Quotient<CGAL::MP_Float> >, CGAL::Algebraic_kernel_for_circles_2_2<CGAL::Quotient<CGAL::MP_Float> > > >::count' | include/CGAL/Qt/GraphicsViewCircularArcInput.h:79: warning: when initialized here | | ------------------------------------------------------------------------ | r58180 | lrineau | 2010-08-20 11:56:19 +0200 (Fri, 20 Aug 2010) | 21 lines | Changed paths: | M /branches/CGAL-3.7-branch/Convex_hull_d/include/CGAL/Delaunay_d.h | | Fix warnings: | | include/CGAL/Delaunay_d.h: In member function 'CGAL::Delaunay_d<R_, Lifted_R_>::Simplex_iterator& CGAL::Delaunay_d<R_, Lifted_R_>::Simplex_iterator::operator++() [with R_ = CGAL::Cartesian_d<double, CGAL::Linear_algebraCd<double, std::allocator<double> > >, Lifted_R_ = CGAL::Cartesian_d<double, CGAL::Linear_algebraCd<double, std::allocator<double> > >]': | include/CGAL/Delaunay_d.h:1011: instantiated from 'std::list<typename CGAL::Delaunay_d<R_, Lifted_R_>::Simplex_handle, std::allocator<typename CGAL::Delaunay_d<R_, Lifted_R_>::Simplex_handle> > CGAL::Delaunay_d<R_, Lifted_R_>::all_simplices(CGAL::Delaunay_d<R_, Lifted_R_>::Delaunay_voronoi_kind) const [with R_ = CGAL::Cartesian_d<double, CGAL::Linear_algebraCd<double, std::allocator<double> > >, Lifted_R_ = CGAL::Cartesian_d<double, CGAL::Linear_algebraCd<double, std::allocator<double> > >]' | cmake/platforms/i686_Linux-2.6_g++-4.3.3_CentOS-5.1-O2/test/Convex_hull_d/delaunay_d-test.cpp:74: instantiated from here | include/CGAL/Delaunay_d.h:229: warning: suggest parentheses around && within || | include/CGAL/Delaunay_d.h: In member function 'CGAL::Delaunay_d<R_, Lifted_R_>::Simplex_iterator& CGAL::Delaunay_d<R_, Lifted_R_>::Simplex_iterator::operator++() [with R_ = CGAL::Homogeneous_d<CGAL::Gmpz, CGAL::Linear_algebraHd<CGAL::Gmpz, std::allocator<CGAL::Gmpz> > >, Lifted_R_ = CGAL::Homogeneous_d<CGAL::Gmpz, CGAL::Linear_algebraHd<CGAL::Gmpz, std::allocator<CGAL::Gmpz> > >]': | include/CGAL/Delaunay_d.h:1011: instantiated from 'std::list<typename CGAL::Delaunay_d<R_, Lifted_R_>::Simplex_handle, std::allocator<typename CGAL::Delaunay_d<R_, Lifted_R_>::Simplex_handle> > CGAL::Delaunay_d<R_, Lifted_R_>::all_simplices(CGAL::Delaunay_d<R_, Lifted_R_>::Delaunay_voronoi_kind) const [with R_ = CGAL::Homogeneous_d<CGAL::Gmpz, CGAL::Linear_algebraHd<CGAL::Gmpz, std::allocator<CGAL::Gmpz> > >, Lifted_R_ = CGAL::Homogeneous_d<CGAL::Gmpz, CGAL::Linear_algebraHd<CGAL::Gmpz, std::allocator<CGAL::Gmpz> > >]' | cmake/platforms/i686_Linux-2.6_g++-4.3.3_CentOS-5.1-O2/test/Convex_hull_d/delaunay_d-test.cpp:162: instantiated from here | include/CGAL/Delaunay_d.h:229: warning: suggest parentheses around && within || | include/CGAL/Delaunay_d.h: In constructor 'CGAL::Delaunay_d<R_, Lifted_R_>::Simplex_iterator::Simplex_iterator(CGAL::Delaunay_d<R_, Lifted_R_>*, typename CGAL::Convex_hull_d<Lifted_R_>::Simplex_iterator, CGAL::Delaunay_d<R_, Lifted_R_>::Delaunay_voronoi_kind) [with R_ = CGAL::Cartesian_d<double, CGAL::Linear_algebraCd<double, std::allocator<double> > >, Lifted_R_ = CGAL::Cartesian_d<double, CGAL::Linear_algebraCd<double, std::allocator<double> > >]': | include/CGAL/Delaunay_d.h:575: instantiated from 'CGAL::Delaunay_d<R_, Lifted_R_>::Simplex_iterator CGAL::Delaunay_d<R_, Lifted_R_>::simplices_begin(CGAL::Delaunay_d<R_, Lifted_R_>::Delaunay_voronoi_kind) [with R_ = CGAL::Cartesian_d<double, CGAL::Linear_algebraCd<double, std::allocator<double> > >, Lifted_R_ = CGAL::Cartesian_d<double, CGAL::Linear_algebraCd<double, std::allocator<double> > >]' | include/CGAL/Delaunay_d.h:1011: instantiated from 'std::list<typename CGAL::Delaunay_d<R_, Lifted_R_>::Simplex_handle, std::allocator<typename CGAL::Delaunay_d<R_, Lifted_R_>::Simplex_handle> > CGAL::Delaunay_d<R_, Lifted_R_>::all_simplices(CGAL::Delaunay_d<R_, Lifted_R_>::Delaunay_voronoi_kind) const [with R_ = CGAL::Cartesian_d<double, CGAL::Linear_algebraCd<double, std::allocator<double> > >, Lifted_R_ = CGAL::Cartesian_d<double, CGAL::Linear_algebraCd<double, std::allocator<double> > >]' | cmake/platforms/i686_Linux-2.6_g++-4.3.3_CentOS-5.1-O2/test/Convex_hull_d/delaunay_d-test.cpp:74: instantiated from here | include/CGAL/Delaunay_d.h:213: warning: suggest parentheses around && within || | include/CGAL/Delaunay_d.h: In constructor 'CGAL::Delaunay_d<R_, Lifted_R_>::Simplex_iterator::Simplex_iterator(CGAL::Delaunay_d<R_, Lifted_R_>*, typename CGAL::Convex_hull_d<Lifted_R_>::Simplex_iterator, CGAL::Delaunay_d<R_, Lifted_R_>::Delaunay_voronoi_kind) [with R_ = CGAL::Homogeneous_d<CGAL::Gmpz, CGAL::Linear_algebraHd<CGAL::Gmpz, std::allocator<CGAL::Gmpz> > >, Lifted_R_ = CGAL::Homogeneous_d<CGAL::Gmpz, CGAL::Linear_algebraHd<CGAL::Gmpz, std::allocator<CGAL::Gmpz> > >]': | include/CGAL/Delaunay_d.h:575: instantiated from 'CGAL::Delaunay_d<R_, Lifted_R_>::Simplex_iterator CGAL::Delaunay_d<R_, Lifted_R_>::simplices_begin(CGAL::Delaunay_d<R_, Lifted_R_>::Delaunay_voronoi_kind) [with R_ = CGAL::Homogeneous_d<CGAL::Gmpz, CGAL::Linear_algebraHd<CGAL::Gmpz, std::allocator<CGAL::Gmpz> > >, Lifted_R_ = CGAL::Homogeneous_d<CGAL::Gmpz, CGAL::Linear_algebraHd<CGAL::Gmpz, std::allocator<CGAL::Gmpz> > >]' | include/CGAL/Delaunay_d.h:1011: instantiated from 'std::list<typename CGAL::Delaunay_d<R_, Lifted_R_>::Simplex_handle, std::allocator<typename CGAL::Delaunay_d<R_, Lifted_R_>::Simplex_handle> > CGAL::Delaunay_d<R_, Lifted_R_>::all_simplices(CGAL::Delaunay_d<R_, Lifted_R_>::Delaunay_voronoi_kind) const [with R_ = CGAL::Homogeneous_d<CGAL::Gmpz, CGAL::Linear_algebraHd<CGAL::Gmpz, std::allocator<CGAL::Gmpz> > >, Lifted_R_ = CGAL::Homogeneous_d<CGAL::Gmpz, CGAL::Linear_algebraHd<CGAL::Gmpz, std::allocator<CGAL::Gmpz> > >]' | cmake/platforms/i686_Linux-2.6_g++-4.3.3_CentOS-5.1-O2/test/Convex_hull_d/delaunay_d-test.cpp:162: instantiated from here | include/CGAL/Delaunay_d.h:213: warning: suggest parentheses around && within || | | ------------------------------------------------------------------------ | r58181 | lrineau | 2010-08-20 12:11:35 +0200 (Fri, 20 Aug 2010) | 3 lines | Changed paths: | M /branches/CGAL-3.7-branch/Installation/test/Installation/link_to_CGAL_Qt4.cpp | | Fix a warning: | test/Installation/link_to_CGAL_Qt4.cpp:11: warning: the address of 'f' will never be NULL | | ------------------------------------------------------------------------ | r58182 | lrineau | 2010-08-20 12:15:14 +0200 (Fri, 20 Aug 2010) | 3 lines | Changed paths: | M /branches/CGAL-3.7-branch/Jet_fitting_3/include/CGAL/Monge_via_jet_fitting.h | | Fix a warning: | include/CGAL/Monge_via_jet_fitting.h:425: warning: comparison between signed and unsigned integer expressions | | ------------------------------------------------------------------------ | r58183 | lrineau | 2010-08-20 12:19:36 +0200 (Fri, 20 Aug 2010) | 4 lines | Changed paths: | M /branches/CGAL-3.7-branch/Min_circle_2/include/CGAL/Min_circle_2.h | M /branches/CGAL-3.7-branch/Min_circle_2/test/Min_circle_2/test_Min_circle.cpp | | Fix warnings: | "comparison between signed and unsigned integer expressions" | and "unsigned is always >= 0" | | ------------------------------------------------------------------------ | r58184 | lrineau | 2010-08-20 12:22:35 +0200 (Fri, 20 Aug 2010) | 2 lines | Changed paths: | M /branches/CGAL-3.7-branch/Min_ellipse_2/test/Min_ellipse_2/test_Min_ellipse_2.cpp | | Fix warnings about comparison between signed and unsigned. | | ------------------------------------------------------------------------
286 lines
13 KiB
C++
286 lines
13 KiB
C++
// Copyright (c) 1999 Utrecht University (The Netherlands),
|
|
// ETH Zurich (Switzerland), Freie Universitaet Berlin (Germany),
|
|
// INRIA Sophia-Antipolis (France), Martin-Luther-University Halle-Wittenberg
|
|
// (Germany), Max-Planck-Institute Saarbruecken (Germany), RISC Linz (Austria),
|
|
// and Tel-Aviv University (Israel). All rights reserved.
|
|
//
|
|
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
|
// modify it under the terms of the GNU Lesser General Public License as
|
|
// published by the Free Software Foundation; version 2.1 of the License.
|
|
// See the file LICENSE.LGPL distributed with CGAL.
|
|
//
|
|
// Licensees holding a valid commercial license may use this file in
|
|
// accordance with the commercial license agreement provided with the software.
|
|
//
|
|
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
|
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
|
//
|
|
// $URL$
|
|
// $Id$
|
|
//
|
|
//
|
|
// Author(s) : Geert-Jan Giezeman and Sven Schoenherr
|
|
|
|
#include <CGAL/config.h>
|
|
|
|
#ifndef CGAL_ASSERTIONS_H
|
|
#define CGAL_ASSERTIONS_H
|
|
|
|
// #include <CGAL/assertions_behaviour.h> // for backward compatibility
|
|
|
|
namespace CGAL {
|
|
|
|
// function declarations
|
|
// =====================
|
|
// failure functions
|
|
// -----------------
|
|
void assertion_fail ( const char*, const char*, int, const char* = "") CGAL_NORETURN;
|
|
void precondition_fail ( const char*, const char*, int, const char* = "") CGAL_NORETURN;
|
|
void postcondition_fail ( const char*, const char*, int, const char* = "") CGAL_NORETURN;
|
|
|
|
// warning function
|
|
// ----------------
|
|
void warning_fail( const char*, const char*, int, const char* = "");
|
|
|
|
|
|
// The following declarations are needed first, before assertions are used.
|
|
// ---------------------------------------------------------------------
|
|
template < typename T > class Uncertain;
|
|
inline bool possibly(bool b);
|
|
inline bool possibly(Uncertain<bool> c);
|
|
|
|
|
|
// macro definitions
|
|
// =================
|
|
// assertions
|
|
// ----------
|
|
|
|
#ifdef NDEBUG
|
|
# ifndef CGAL_NDEBUG
|
|
# define CGAL_NDEBUG
|
|
# endif
|
|
#endif
|
|
|
|
#ifdef CGAL_NDEBUG
|
|
# define CGAL_NO_ASSERTIONS
|
|
# define CGAL_NO_PRECONDITIONS
|
|
# define CGAL_NO_POSTCONDITIONS
|
|
# define CGAL_NO_WARNINGS
|
|
#endif
|
|
|
|
#if defined(CGAL_NO_ASSERTIONS)
|
|
# define CGAL_assertion(EX) (static_cast<void>(0))
|
|
# define CGAL_assertion_msg(EX,MSG) (static_cast<void>(0))
|
|
# define CGAL_assertion_code(CODE)
|
|
#else
|
|
# define CGAL_assertion(EX) \
|
|
(CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__))
|
|
# define CGAL_assertion_msg(EX,MSG) \
|
|
(CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__, MSG))
|
|
# define CGAL_assertion_code(CODE) CODE
|
|
#endif // CGAL_NO_ASSERTIONS
|
|
|
|
#if defined(CGAL_NO_ASSERTIONS) || !defined(CGAL_CHECK_EXACTNESS)
|
|
# define CGAL_exactness_assertion(EX) (static_cast<void>(0))
|
|
# define CGAL_exactness_assertion_msg(EX,MSG) (static_cast<void>(0))
|
|
# define CGAL_exactness_assertion_code(CODE)
|
|
#else
|
|
# define CGAL_exactness_assertion(EX) \
|
|
(CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__))
|
|
# define CGAL_exactness_assertion_msg(EX,MSG) \
|
|
(CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__, MSG))
|
|
# define CGAL_exactness_assertion_code(CODE) CODE
|
|
#endif // CGAL_NO_ASSERTIONS
|
|
|
|
#if defined(CGAL_NO_ASSERTIONS) || !defined(CGAL_CHECK_EXPENSIVE)
|
|
# define CGAL_expensive_assertion(EX) (static_cast<void>(0))
|
|
# define CGAL_expensive_assertion_msg(EX,MSG) (static_cast<void>(0))
|
|
# define CGAL_expensive_assertion_code(CODE)
|
|
#else
|
|
# define CGAL_expensive_assertion(EX) \
|
|
(CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__))
|
|
# define CGAL_expensive_assertion_msg(EX,MSG) \
|
|
(CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__, MSG))
|
|
# define CGAL_expensive_assertion_code(CODE) CODE
|
|
#endif // CGAL_NO_ASSERTIONS
|
|
|
|
#if defined(CGAL_NO_ASSERTIONS) || !defined(CGAL_CHECK_EXACTNESS) || !defined(CGAL_CHECK_EXPENSIVE)
|
|
# define CGAL_expensive_exactness_assertion(EX) (static_cast<void>(0))
|
|
# define CGAL_expensive_exactness_assertion_msg(EX,MSG) (static_cast<void>(0))
|
|
# define CGAL_expensive_exactness_assertion_code(CODE)
|
|
#else
|
|
# define CGAL_expensive_exactness_assertion(EX) \
|
|
(CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__))
|
|
# define CGAL_expensive_exactness_assertion_msg(EX,MSG) \
|
|
(CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__, MSG))
|
|
# define CGAL_expensive_exactness_assertion_code(CODE) CODE
|
|
#endif // CGAL_NO_ASSERTIONS
|
|
|
|
|
|
// preconditions
|
|
// -------------
|
|
|
|
#if defined(CGAL_NO_PRECONDITIONS)
|
|
# define CGAL_precondition(EX) (static_cast<void>(0))
|
|
# define CGAL_precondition_msg(EX,MSG) (static_cast<void>(0))
|
|
# define CGAL_precondition_code(CODE)
|
|
#else
|
|
# define CGAL_precondition(EX) \
|
|
(CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::precondition_fail( # EX , __FILE__, __LINE__))
|
|
# define CGAL_precondition_msg(EX,MSG) \
|
|
(CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::precondition_fail( # EX , __FILE__, __LINE__, MSG))
|
|
# define CGAL_precondition_code(CODE) CODE
|
|
#endif // CGAL_NO_PRECONDITIONS
|
|
|
|
#if defined(CGAL_NO_PRECONDITIONS) || !defined(CGAL_CHECK_EXACTNESS)
|
|
# define CGAL_exactness_precondition(EX) (static_cast<void>(0))
|
|
# define CGAL_exactness_precondition_msg(EX,MSG) (static_cast<void>(0))
|
|
# define CGAL_exactness_precondition_code(CODE)
|
|
#else
|
|
# define CGAL_exactness_precondition(EX) \
|
|
(CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::precondition_fail( # EX , __FILE__, __LINE__))
|
|
# define CGAL_exactness_precondition_msg(EX,MSG) \
|
|
(CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::precondition_fail( # EX , __FILE__, __LINE__, MSG))
|
|
# define CGAL_exactness_precondition_code(CODE) CODE
|
|
#endif // CGAL_NO_PRECONDITIONS
|
|
|
|
#if defined(CGAL_NO_PRECONDITIONS) || !defined(CGAL_CHECK_EXPENSIVE)
|
|
# define CGAL_expensive_precondition(EX) (static_cast<void>(0))
|
|
# define CGAL_expensive_precondition_msg(EX,MSG) (static_cast<void>(0))
|
|
# define CGAL_expensive_precondition_code(CODE)
|
|
#else
|
|
# define CGAL_expensive_precondition(EX) \
|
|
(CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::precondition_fail( # EX , __FILE__, __LINE__))
|
|
# define CGAL_expensive_precondition_msg(EX,MSG) \
|
|
(CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::precondition_fail( # EX , __FILE__, __LINE__, MSG))
|
|
# define CGAL_expensive_precondition_code(CODE) CODE
|
|
#endif // CGAL_NO_PRECONDITIONS
|
|
|
|
#if defined(CGAL_NO_PRECONDITIONS) || !defined(CGAL_CHECK_EXACTNESS) || !defined(CGAL_CHECK_EXPENSIVE)
|
|
# define CGAL_expensive_exactness_precondition(EX) (static_cast<void>(0))
|
|
# define CGAL_expensive_exactness_precondition_msg(EX,MSG) (static_cast<void>(0))
|
|
# define CGAL_expensive_exactness_precondition_code(CODE)
|
|
#else
|
|
# define CGAL_expensive_exactness_precondition(EX) \
|
|
(CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::precondition_fail( # EX , __FILE__, __LINE__))
|
|
# define CGAL_expensive_exactness_precondition_msg(EX,MSG) \
|
|
(CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::precondition_fail( # EX , __FILE__, __LINE__, MSG))
|
|
# define CGAL_expensive_exactness_precondition_code(CODE) CODE
|
|
#endif // CGAL_NO_PRECONDITIONS
|
|
|
|
|
|
// postconditions
|
|
// --------------
|
|
|
|
#if defined(CGAL_NO_POSTCONDITIONS)
|
|
# define CGAL_postcondition(EX) (static_cast<void>(0))
|
|
# define CGAL_postcondition_msg(EX,MSG) (static_cast<void>(0))
|
|
# define CGAL_postcondition_code(CODE)
|
|
#else
|
|
# define CGAL_postcondition(EX) \
|
|
(CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::postcondition_fail( # EX , __FILE__, __LINE__))
|
|
# define CGAL_postcondition_msg(EX,MSG) \
|
|
(CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::postcondition_fail( # EX , __FILE__, __LINE__, MSG))
|
|
# define CGAL_postcondition_code(CODE) CODE
|
|
#endif // CGAL_NO_POSTCONDITIONS
|
|
|
|
#if defined(CGAL_NO_POSTCONDITIONS) || !defined(CGAL_CHECK_EXACTNESS)
|
|
# define CGAL_exactness_postcondition(EX) (static_cast<void>(0))
|
|
# define CGAL_exactness_postcondition_msg(EX,MSG) (static_cast<void>(0))
|
|
# define CGAL_exactness_postcondition_code(CODE)
|
|
#else
|
|
# define CGAL_exactness_postcondition(EX) \
|
|
(CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::postcondition_fail( # EX , __FILE__, __LINE__))
|
|
# define CGAL_exactness_postcondition_msg(EX,MSG) \
|
|
(CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::postcondition_fail( # EX , __FILE__, __LINE__, MSG))
|
|
# define CGAL_exactness_postcondition_code(CODE) CODE
|
|
#endif // CGAL_NO_POSTCONDITIONS
|
|
|
|
#if defined(CGAL_NO_POSTCONDITIONS) || !defined(CGAL_CHECK_EXPENSIVE)
|
|
# define CGAL_expensive_postcondition(EX) (static_cast<void>(0))
|
|
# define CGAL_expensive_postcondition_msg(EX,MSG) (static_cast<void>(0))
|
|
# define CGAL_expensive_postcondition_code(CODE)
|
|
#else
|
|
# define CGAL_expensive_postcondition(EX) \
|
|
(CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::postcondition_fail( # EX , __FILE__, __LINE__))
|
|
# define CGAL_expensive_postcondition_msg(EX,MSG) \
|
|
(CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::postcondition_fail( # EX , __FILE__, __LINE__, MSG))
|
|
# define CGAL_expensive_postcondition_code(CODE) CODE
|
|
#endif // CGAL_NO_POSTCONDITIONS
|
|
|
|
#if defined(CGAL_NO_POSTCONDITIONS) || !defined(CGAL_CHECK_EXACTNESS) || !defined(CGAL_CHECK_EXPENSIVE)
|
|
# define CGAL_expensive_exactness_postcondition(EX) (static_cast<void>(0))
|
|
# define CGAL_expensive_exactness_postcondition_msg(EX,MSG) (static_cast<void>(0))
|
|
# define CGAL_expensive_exactness_postcondition_code(CODE)
|
|
#else
|
|
# define CGAL_expensive_exactness_postcondition(EX) \
|
|
(CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::postcondition_fail( # EX , __FILE__, __LINE__))
|
|
# define CGAL_expensive_exactness_postcondition_msg(EX,MSG) \
|
|
(CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::postcondition_fail( # EX , __FILE__, __LINE__, MSG))
|
|
# define CGAL_expensive_exactness_postcondition_code(CODE) CODE
|
|
#endif // CGAL_NO_POSTCONDITIONS
|
|
|
|
|
|
// warnings
|
|
// --------
|
|
|
|
#if defined(CGAL_NO_WARNINGS)
|
|
# define CGAL_warning(EX) (static_cast<void>(0))
|
|
# define CGAL_warning_msg(EX,MSG) (static_cast<void>(0))
|
|
# define CGAL_warning_code(CODE)
|
|
#else
|
|
# define CGAL_warning(EX) \
|
|
(CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::warning_fail( # EX , __FILE__, __LINE__))
|
|
# define CGAL_warning_msg(EX,MSG) \
|
|
(CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::warning_fail( # EX , __FILE__, __LINE__, MSG))
|
|
# define CGAL_warning_code(CODE) CODE
|
|
#endif // CGAL_NO_WARNINGS
|
|
|
|
#if defined(CGAL_NO_WARNINGS) || !defined(CGAL_CHECK_EXACTNESS)
|
|
# define CGAL_exactness_warning(EX) (static_cast<void>(0))
|
|
# define CGAL_exactness_warning_msg(EX,MSG) (static_cast<void>(0))
|
|
# define CGAL_exactness_warning_code(CODE)
|
|
#else
|
|
# define CGAL_exactness_warning(EX) \
|
|
(CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::warning_fail( # EX , __FILE__, __LINE__))
|
|
# define CGAL_exactness_warning_msg(EX,MSG) \
|
|
(CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::warning_fail( # EX , __FILE__, __LINE__, MSG))
|
|
# define CGAL_exactness_warning_code(CODE) CODE
|
|
#endif // CGAL_NO_WARNINGS
|
|
|
|
#if defined(CGAL_NO_WARNINGS) || !defined(CGAL_CHECK_EXPENSIVE)
|
|
# define CGAL_expensive_warning(EX) (static_cast<void>(0))
|
|
# define CGAL_expensive_warning_msg(EX,MSG) (static_cast<void>(0))
|
|
# define CGAL_expensive_warning_code(CODE)
|
|
#else
|
|
# define CGAL_expensive_warning(EX) \
|
|
(CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::warning_fail( # EX , __FILE__, __LINE__))
|
|
# define CGAL_expensive_warning_msg(EX,MSG) \
|
|
(CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::warning_fail( # EX , __FILE__, __LINE__, MSG))
|
|
# define CGAL_expensive_warning_code(CODE) CODE
|
|
#endif // CGAL_NO_WARNINGS
|
|
|
|
#if defined(CGAL_NO_WARNINGS) || !defined(CGAL_CHECK_EXACTNESS) || !defined(CGAL_CHECK_EXPENSIVE)
|
|
# define CGAL_expensive_exactness_warning(EX) (static_cast<void>(0))
|
|
# define CGAL_expensive_exactness_warning_msg(EX,MSG) (static_cast<void>(0))
|
|
# define CGAL_expensive_exactness_warning_code(CODE)
|
|
#else
|
|
# define CGAL_expensive_exactness_warning(EX) \
|
|
(CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::warning_fail( # EX , __FILE__, __LINE__))
|
|
# define CGAL_expensive_exactness_warning_msg(EX,MSG) \
|
|
(CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::warning_fail( # EX , __FILE__, __LINE__, MSG))
|
|
# define CGAL_expensive_exactness_warning_code(CODE) CODE
|
|
#endif // CGAL_NO_WARNINGS
|
|
|
|
// CGAL error
|
|
#define CGAL_error_msg(MSG) ::CGAL::assertion_fail( "", __FILE__, __LINE__, MSG )
|
|
#define CGAL_error() ::CGAL::assertion_fail( "", __FILE__, __LINE__ )
|
|
|
|
} //namespace CGAL
|
|
|
|
// This comes last as it is dependant on the macros to be defined.
|
|
// But the macros need CGAL::possibly().
|
|
#include <CGAL/Uncertain.h>
|
|
|
|
#endif // CGAL_ASSERTIONS_H
|