From 0c9cb3d99b0dc2c6029ff6da067e2face4281921 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Tue, 13 Aug 2024 17:18:45 +0100 Subject: [PATCH] CGAL_assertion ( uses also 'e') --- Kernel_23/include/CGAL/Bbox.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Kernel_23/include/CGAL/Bbox.h b/Kernel_23/include/CGAL/Bbox.h index 126f3353490..dad7bef36d1 100644 --- a/Kernel_23/include/CGAL/Bbox.h +++ b/Kernel_23/include/CGAL/Bbox.h @@ -17,6 +17,8 @@ #include #include #include +#include +#include namespace CGAL { namespace Impl { @@ -109,6 +111,7 @@ protected: template void init(int d, I b, I e) { + CGAL_assertion(d == std::distance(b,e)); for(int i=0; i, Bbox> enum { D = N }; public: inline constexpr int dimension() const { return D; } - Bbox(int d = 0 ) { assert(d==N || d==0); this->init(d ); } - Bbox(int d, const T& range) { assert(d==N || d==0); this->init(d, range); } + Bbox(int d = 0 ) { CGAL_assertion(d==N || d==0); this->init(d ); } + Bbox(int d, const T& range) { CGAL_assertion(d==N || d==0); this->init(d, range); } template - Bbox(int d, I b, I e) { assert(d==N || d==0); this->init(d, b, e); } + Bbox(int d, I b, I e) { CGAL_assertion(d==N || d==0); this->init(d, b, e); } }; // A dynamic D-dimensional axis aligned box