From 932ba31013d494b191261ed15455b491ad07d155 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Fri, 28 Apr 2023 20:08:58 +0200 Subject: [PATCH 01/22] bump CGAL version to 6.0 --- Installation/include/CGAL/version.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Installation/include/CGAL/version.h b/Installation/include/CGAL/version.h index d90474f8913..482cd7db1a6 100644 --- a/Installation/include/CGAL/version.h +++ b/Installation/include/CGAL/version.h @@ -17,12 +17,12 @@ #define CGAL_VERSION_H #ifndef SWIG -#define CGAL_VERSION 5.6-beta1 +#define CGAL_VERSION 6.0-beta1 #define CGAL_GIT_HASH abcdef #endif -#define CGAL_VERSION_NR 1050600910 +#define CGAL_VERSION_NR 1060000910 #define CGAL_SVN_REVISION 99999 -#define CGAL_RELEASE_DATE 20230430 +#define CGAL_RELEASE_DATE 20231001 #include From fcd71fa9f3612a3e04a4413a7940e756d5109b2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Fri, 28 Apr 2023 20:16:28 +0200 Subject: [PATCH 02/22] CGAL now requires C++17 --- Installation/cmake/modules/CGAL_SetupCGALDependencies.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Installation/cmake/modules/CGAL_SetupCGALDependencies.cmake b/Installation/cmake/modules/CGAL_SetupCGALDependencies.cmake index 7329be33116..de0f5eb7fa4 100644 --- a/Installation/cmake/modules/CGAL_SetupCGALDependencies.cmake +++ b/Installation/cmake/modules/CGAL_SetupCGALDependencies.cmake @@ -97,8 +97,8 @@ function(CGAL_setup_CGAL_dependencies target) target_compile_definitions(${target} INTERFACE CGAL_TEST_SUITE=1) endif() - # CGAL now requires C++14. `decltype(auto)` is used as a marker of C++14. - target_compile_features(${target} INTERFACE cxx_decltype_auto) + # CGAL now requires C++17 + target_compile_features(${target} INTERFACE cxx_std_17) use_CGAL_Boost_support(${target} INTERFACE) From 163dd738d9b17facd54a9e9cfc2770b34354afda Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Mon, 5 Jun 2023 11:31:39 +0100 Subject: [PATCH 03/22] PSP: wlop_simplify() performance improvement --- .../include/CGAL/wlop_simplify_and_regularize_point_set.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Point_set_processing_3/include/CGAL/wlop_simplify_and_regularize_point_set.h b/Point_set_processing_3/include/CGAL/wlop_simplify_and_regularize_point_set.h index 41412051408..149944d50a2 100644 --- a/Point_set_processing_3/include/CGAL/wlop_simplify_and_regularize_point_set.h +++ b/Point_set_processing_3/include/CGAL/wlop_simplify_and_regularize_point_set.h @@ -525,6 +525,7 @@ wlop_simplify_and_regularize_point_set( if (require_uniform_sampling)//default value is false { + original_density_weights.reserve(number_of_original); //todo: this part could also be parallelized if needed for (it = first_original_iter, i = 0; it != points.end() ; ++it, ++i) { @@ -552,6 +553,7 @@ wlop_simplify_and_regularize_point_set( // Compute sample density weight for sample points std::vector sample_density_weights; + sample_density_weights.reserve(number_of_sample); for (sample_iter = sample_points.begin(); sample_iter != sample_points.end(); ++sample_iter) @@ -602,9 +604,7 @@ wlop_simplify_and_regularize_point_set( if (interrupted) return output; - sample_iter = sample_points.begin(); - for (std::size_t i = 0; i < sample_points.size(); ++ i) - sample_points[i] = update_sample_points[i]; + sample_points.swap(update_sample_points); } // final output From 9fbfd93b56af9be923a5e1297e45a353a786c608 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Thu, 8 Jun 2023 18:09:44 +0200 Subject: [PATCH 04/22] Fix function name --- .../Polyhedron/Plugins/IO/Polylines_io_plugin.cpp | 2 +- .../demo/Polyhedron/Plugins/PMP/Extrude_plugin.cpp | 4 ++-- .../Plugins/PMP/Repair_polyhedron_plugin.cpp | 2 +- .../Point_set/Point_set_shape_detection_plugin.cpp | 2 +- Polyhedron/demo/Polyhedron/Scene_item.cpp | 2 +- .../demo/Polyhedron/Scene_item_rendering_helper.cpp | 10 +++++----- .../Polyhedron/Scene_points_with_normal_item.cpp | 2 +- Three/include/CGAL/Three/Scene_item.h | 12 ++++++------ .../include/CGAL/Three/Scene_item_rendering_helper.h | 2 +- 9 files changed, 19 insertions(+), 19 deletions(-) diff --git a/Polyhedron/demo/Polyhedron/Plugins/IO/Polylines_io_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/IO/Polylines_io_plugin.cpp index fa09b603654..e500ffb92a8 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/IO/Polylines_io_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/IO/Polylines_io_plugin.cpp @@ -343,7 +343,7 @@ void Polyhedron_demo_polylines_io_plugin::simplify() { Scene_polylines_item* item = qobject_cast(scene->item(scene->mainSelectionIndex())); bool ok; - double err = QInputDialog::getDouble(mw, "Squared Frechet Distance", "Enter the squared approximation error:", pow(0.01*item->diagonalBbox(),2),0,999,8,&ok); + double err = QInputDialog::getDouble(mw, "Squared Frechet Distance", "Enter the squared approximation error:", pow(0.01*item->bboxDiagonal(),2),0,999,8,&ok); if(!ok) return; for(Scene_polylines_item::Polylines_container::iterator diff --git a/Polyhedron/demo/Polyhedron/Plugins/PMP/Extrude_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/PMP/Extrude_plugin.cpp index 308bd503d95..caea10065a9 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/PMP/Extrude_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/PMP/Extrude_plugin.cpp @@ -404,8 +404,8 @@ private Q_SLOTS: // compute centroid Point c = CGAL::centroid(triangles.begin(),triangles.end()); - oliver_queen = new Scene_arrow_item(Vec(c.x(),c.y(),c.z()), fg_item->diagonalBbox() / 50.0f, - fg_item->diagonalBbox()/3.0f); + oliver_queen = new Scene_arrow_item(Vec(c.x(),c.y(),c.z()), fg_item->bboxDiagonal() / 50.0f, + fg_item->bboxDiagonal()/3.0f); Vec dir(plane.orthogonal_vector().x(), plane.orthogonal_vector().y(), plane.orthogonal_vector().z()); diff --git a/Polyhedron/demo/Polyhedron/Plugins/PMP/Repair_polyhedron_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/PMP/Repair_polyhedron_plugin.cpp index 1cae60b9a70..5ecc8921433 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/PMP/Repair_polyhedron_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/PMP/Repair_polyhedron_plugin.cpp @@ -192,7 +192,7 @@ void Polyhedron_demo_repair_polyhedron_plugin::on_actionRemoveNeedlesAndCaps_tri QDialog dialog; Ui::NeedleDialog ui; ui.setupUi(&dialog); - ui.collapseBox->setValue(sm_item->diagonalBbox()*0.01); + ui.collapseBox->setValue(sm_item->bboxDiagonal()*0.01); if(dialog.exec() != QDialog::Accepted) return; CGAL::Polygon_mesh_processing::remove_almost_degenerate_faces(*sm_item->face_graph(), diff --git a/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_shape_detection_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_shape_detection_plugin.cpp index fc344cec857..68a1fe2c6d3 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_shape_detection_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_shape_detection_plugin.cpp @@ -928,7 +928,7 @@ void Polyhedron_demo_point_set_shape_detection_plugin::on_actionDetectShapesSM_t dialog.m_cluster_epsilon_field->setEnabled(false); dialog.groupBox_3->setEnabled(false); //todo: check default values - dialog.m_epsilon_field->setValue(0.01*sm_item->diagonalBbox()); + dialog.m_epsilon_field->setValue(0.01*sm_item->bboxDiagonal()); std::size_t nb_faces = mesh->number_of_faces(); dialog.m_min_pts_field->setValue((std::max)(static_cast(0.01*nb_faces), 1)); if(!dialog.exec()) return; diff --git a/Polyhedron/demo/Polyhedron/Scene_item.cpp b/Polyhedron/demo/Polyhedron/Scene_item.cpp index 1951ee8ff7c..1b54ec52993 100644 --- a/Polyhedron/demo/Polyhedron/Scene_item.cpp +++ b/Polyhedron/demo/Polyhedron/Scene_item.cpp @@ -22,7 +22,7 @@ CGAL::Three::Scene_item::Scene_item(int buffers_size, int vaos_size) CGAL::QGLViewer::QGLViewerPool().first()->makeCurrent(); is_bbox_computed = false; - is_diag_bbox_computed = false; + is_bbox_diag_computed = false; for(int i=0; iis_diag_bbox_computed) +double Scene_item_rendering_helper::bboxDiagonal() const { + if(!priv->is_bbox_diag_computed) priv->compute_diag_bbox(); - priv->is_diag_bbox_computed = true; + priv->is_bbox_diag_computed = true; return priv->_diag_bbox; } diff --git a/Polyhedron/demo/Polyhedron/Scene_points_with_normal_item.cpp b/Polyhedron/demo/Polyhedron/Scene_points_with_normal_item.cpp index 7ad2931f252..75bea895cfa 100644 --- a/Polyhedron/demo/Polyhedron/Scene_points_with_normal_item.cpp +++ b/Polyhedron/demo/Polyhedron/Scene_points_with_normal_item.cpp @@ -321,7 +321,7 @@ void Scene_points_with_normal_item_priv::compute_normals_and_vertices() const positions_selected_normals.resize(m_points->nb_selected_points() * 3); // we can't afford computing real average spacing just for display, 0.5% of bbox will do - average_spacing = 0.005 * item->diagonalBbox(); + average_spacing = 0.005 * item->bboxDiagonal(); normal_length = (std::min)(average_spacing, std::sqrt( region_of_interest.squared_radius() / 1000.)); length_factor = 10.0/100*normal_Slider->value(); diff --git a/Three/include/CGAL/Three/Scene_item.h b/Three/include/CGAL/Three/Scene_item.h index f22b9be5f52..ca65c413f3c 100644 --- a/Three/include/CGAL/Three/Scene_item.h +++ b/Three/include/CGAL/Three/Scene_item.h @@ -187,11 +187,11 @@ public: //! If the diagonal's length has never been computed, computes it and //! saves the result for further calls. //! @returns the item's bounding box's diagonal length. - virtual double diagonalBbox() const { - if(!is_diag_bbox_computed) - compute_diag_bbox(); - is_diag_bbox_computed = true; - return _diag_bbox; + virtual double bboxDiagonal() const { + if(!is_bbox_diag_computed) + compute_diag_bbox(); + is_bbox_diag_computed = true; + return _diag_bbox; } // Function about manipulation @@ -413,7 +413,7 @@ protected: mutable Bbox _bbox; mutable double _diag_bbox; mutable bool is_bbox_computed; - mutable bool is_diag_bbox_computed; + mutable bool is_bbox_diag_computed; virtual void compute_bbox()const{} virtual void compute_diag_bbox()const; // The four basic properties diff --git a/Three/include/CGAL/Three/Scene_item_rendering_helper.h b/Three/include/CGAL/Three/Scene_item_rendering_helper.h index f654139c2a6..72fd4ce154a 100644 --- a/Three/include/CGAL/Three/Scene_item_rendering_helper.h +++ b/Three/include/CGAL/Three/Scene_item_rendering_helper.h @@ -174,7 +174,7 @@ public: //! saves the result for further calls. //! @returns the item's bounding box's diagonal length. //! @todo must replace the one from Scene_item eventually - virtual double diagonalBbox() const Q_DECL_OVERRIDE; + virtual double bboxDiagonal() const Q_DECL_OVERRIDE; //! //! \brief newViewer adds Vaos for `viewer`. //! \param viewer the new viewer. From f85b8398582e1f2e7b86c8003e5e6d443a40d074 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Thu, 8 Jun 2023 18:09:53 +0200 Subject: [PATCH 05/22] Do not proceed if user cancels --- .../Subdivision_methods_plugin.cpp | 51 ++++++++++++------- 1 file changed, 33 insertions(+), 18 deletions(-) diff --git a/Polyhedron/demo/Polyhedron/Plugins/Subdivision_methods/Subdivision_methods_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Subdivision_methods/Subdivision_methods_plugin.cpp index 84e3b4702ce..87bb50fd96f 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Subdivision_methods/Subdivision_methods_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Subdivision_methods/Subdivision_methods_plugin.cpp @@ -95,16 +95,19 @@ void Polyhedron_demo_subdivision_methods_plugin::apply_loop(FaceGraphItem* item, void Polyhedron_demo_subdivision_methods_plugin::on_actionLoop_triggered() { CGAL::Three::Scene_interface::Item_id index = scene->mainSelectionIndex(); - - Scene_surface_mesh_item* sm_item = - qobject_cast(scene->item(index)); + Scene_surface_mesh_item* sm_item = qobject_cast(scene->item(index)); if(!sm_item) return; + + bool ok = true; int nb_steps = QInputDialog::getInt(mw, QString("Number of Iterations"), QString("Choose number of iterations"), - 1, - 1); + 1 /* value */, 1 /* min */, (std::numeric_limits::max)() /* max */, 1 /*step*/, + &ok); + if(!ok) + return; + apply_loop(sm_item, nb_steps); } @@ -123,18 +126,23 @@ void Polyhedron_demo_subdivision_methods_plugin::apply_catmullclark(FaceGraphIte item->invalidateOpenGLBuffers(); scene->itemChanged(item); } + void Polyhedron_demo_subdivision_methods_plugin::on_actionCatmullClark_triggered() { CGAL::Three::Scene_interface::Item_id index = scene->mainSelectionIndex(); - Scene_surface_mesh_item* sm_item = - qobject_cast(scene->item(index)); + Scene_surface_mesh_item* sm_item = qobject_cast(scene->item(index)); if(!sm_item) return; + + bool ok = true; int nb_steps = QInputDialog::getInt(mw, QString("Number of Iterations"), QString("Choose number of iterations"), - 1, - 1); + 1 /* value */, 1 /* min */, (std::numeric_limits::max)() /* max */, 1 /*step*/, + &ok); + if(!ok) + return; + apply_catmullclark(sm_item, nb_steps); } @@ -157,15 +165,19 @@ void Polyhedron_demo_subdivision_methods_plugin::apply_sqrt3(FaceGraphItem* item void Polyhedron_demo_subdivision_methods_plugin::on_actionSqrt3_triggered() { CGAL::Three::Scene_interface::Item_id index = scene->mainSelectionIndex(); - Scene_surface_mesh_item* sm_item = - qobject_cast(scene->item(index)); + Scene_surface_mesh_item* sm_item = qobject_cast(scene->item(index)); if(!sm_item) return; + + bool ok = true; int nb_steps = QInputDialog::getInt(mw, QString("Number of Iterations"), QString("Choose number of iterations"), - 1, - 1); + 1 /* value */, 1 /* min */, (std::numeric_limits::max)() /* max */, 1 /*step*/, + &ok); + if(!ok) + return; + apply_sqrt3(sm_item, nb_steps); } @@ -189,16 +201,19 @@ void Polyhedron_demo_subdivision_methods_plugin::apply_doosabin(FaceGraphItem* i void Polyhedron_demo_subdivision_methods_plugin::on_actionDooSabin_triggered() { CGAL::Three::Scene_interface::Item_id index = scene->mainSelectionIndex(); - - Scene_surface_mesh_item* sm_item = - qobject_cast(scene->item(index)); + Scene_surface_mesh_item* sm_item = qobject_cast(scene->item(index)); if(!sm_item) return; + + bool ok = true; int nb_steps = QInputDialog::getInt(mw, QString("Number of Iterations"), QString("Choose number of iterations"), - 1, - 1); + 1 /* value */, 1 /* min */, (std::numeric_limits::max)() /* max */, 1 /*step*/, + &ok); + if(!ok) + return; + apply_doosabin(sm_item, nb_steps); } From efd68a5f922ca427bc17e841ce8df3c2387481b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Fri, 9 Jun 2023 19:15:16 +0200 Subject: [PATCH 06/22] Update offset meshing plugin - fixed not working for polygon soups - fixed broken formula for both giving Mesh_3 assertions and inverted meshes - fixed applicable() allowing wrong combinations - fixed inflate() needlessly normalizing normals - fixed crashing for non triangulated inputs - fixed some memory leaks - fixed dialog name - removed useless sqrts - avoid recomputing bbox 4 times - cleaned UI - etc. --- .../Polyhedron/Plugins/Mesh_3/CMakeLists.txt | 13 + .../Offset_meshing_dialog.ui} | 146 ++-- .../Plugins/Mesh_3/Offset_meshing_plugin.cpp | 765 ++++++++++++++++++ .../Plugins/Surface_mesh/CMakeLists.txt | 12 - .../Surface_mesh/Offset_meshing_plugin.cpp | 691 ---------------- 5 files changed, 857 insertions(+), 770 deletions(-) rename Polyhedron/demo/Polyhedron/Plugins/{Surface_mesh/Remeshing_dialog.ui => Mesh_3/Offset_meshing_dialog.ui} (81%) create mode 100644 Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Offset_meshing_plugin.cpp delete mode 100644 Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Offset_meshing_plugin.cpp diff --git a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/CMakeLists.txt b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/CMakeLists.txt index eb4e9c5b57d..2cc3f58854f 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/CMakeLists.txt @@ -116,3 +116,16 @@ if(TBB_FOUND) target_link_libraries(c3t3_io_plugin PUBLIC CGAL::TBB_support) target_link_libraries(c3t3_rib_exporter_plugin PUBLIC CGAL::TBB_support) endif() + +qt5_wrap_ui(offsetMeshingUI_FILES Offset_meshing_dialog.ui) +polyhedron_demo_plugin(offset_meshing_plugin Offset_meshing_plugin + ${offsetMeshingUI_FILES}) +target_link_libraries(offset_meshing_plugin PUBLIC scene_surface_mesh_item + scene_polygon_soup_item + scene_polylines_item) +if(TARGET CGAL::Eigen3_support) + target_link_libraries(offset_meshing_plugin PUBLIC CGAL::Eigen3_support) +endif() +if(TARGET CGAL::TBB_support) + target_link_libraries(offset_meshing_plugin PUBLIC CGAL::TBB_support) +endif() diff --git a/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Remeshing_dialog.ui b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Offset_meshing_dialog.ui similarity index 81% rename from Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Remeshing_dialog.ui rename to Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Offset_meshing_dialog.ui index 37b9073000f..33df99c77bb 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Remeshing_dialog.ui +++ b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Offset_meshing_dialog.ui @@ -1,64 +1,70 @@ - Remeshing_dialog - + Offset_meshing_dialog + 0 0 - 376 - 216 + 413 + 294 Meshing criteria - + 25.0 - - - - 0.00 + + + + Qt::Horizontal + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - + + - Approximation &error: + Edge size Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - 0.00 - - - - - - - &Topological criterion: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - tags - - - + + + true + + + 0.00 + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + @@ -77,43 +83,47 @@ - - - - Qt::Vertical + + + + Topological criterion - - - 20 - 40 - + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + tags - - - true - + 0.00 - - + + - &Edge size: + Approximation error + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + 0.00 + + + + + + + Size Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter @@ -121,22 +131,24 @@ - + - &Size: + Angle Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - &Angle: + + + + + 15 + - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + Meshing Criteria @@ -154,7 +166,7 @@ buttonBox accepted() - Remeshing_dialog + Offset_meshing_dialog accept() @@ -170,7 +182,7 @@ buttonBox rejected() - Remeshing_dialog + Offset_meshing_dialog reject() diff --git a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Offset_meshing_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Offset_meshing_plugin.cpp new file mode 100644 index 00000000000..8b0e0bab57b --- /dev/null +++ b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Offset_meshing_plugin.cpp @@ -0,0 +1,765 @@ +#include "config.h" + +#ifdef CGAL_POLYHEDRON_DEMO_USE_SURFACE_MESHER + +#include +#include "ui_Offset_meshing_dialog.h" + +#include "C3t3_type.h" + +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include +#include +#include +#include +#include "Scene_surface_mesh_item.h" +#include "Scene_polygon_soup_item.h" +#include "Scene_polylines_item.h" +#include +#include +#include +#include + +#include +#include +#include +#include + +using namespace CGAL::Three; + +namespace CGAL { + +template +class Offset_function +{ + using Primitive = AABB_face_graph_triangle_primitive; + using Traits = AABB_traits; + using Tree = AABB_tree; + using Side_of = Side_of_triangle_mesh; + + using FT = typename GeomTraits::FT; + using Point_3 = typename GeomTraits::Point_3; + +public: + Offset_function(const TriangleMesh& tm, + double offset_distance) + : m_tree_ptr(std::make_shared(std::begin(faces(tm)), std::end(faces(tm)), tm)), + m_side_of_ptr(std::make_shared(*m_tree_ptr)), + m_is_inset(offset_distance < 0), + m_sq_offset_distance(CGAL::square(offset_distance)), + m_is_closed(is_closed(tm)) + { + CGAL_assertion(!m_tree_ptr->empty()); + } + + // we only need negative inside, and positive outside, so we can compare square roots + double operator()(const Point_3& p) const + { + const Bounded_side side = m_is_closed ? m_side_of_ptr->operator()(p) : ON_UNBOUNDED_SIDE; + + if(m_is_inset) // also means that the mesh is closed + { + // - ON_UNBOUNDED_SIDE is outside the offset since we are insetting + // - ON_BOUNDARY is outside the offset since we are insetting + if(side != ON_BOUNDED_SIDE) + return 1; + + // inside the offset if the distance to the input mesh is greater than the offset distance + const FT sq_distance = m_tree_ptr->squared_distance(p); + return (sq_distance > m_sq_offset_distance) ? -1 : 1; + } + else // outset + { + // - ON_BOUNDED_SIDE can only happen if it's a closed mesh, and in that case, being inside + // the mesh is being inside the offset + // - ON_BOUNDARY is in the offset whether the mesh is open or closed + if(side != ON_UNBOUNDED_SIDE) + return - 1; + + // inside the offset if the distance to the input mesh is smaller than the offset distance + const FT sq_distance = m_tree_ptr->squared_distance(p); + return (sq_distance < m_sq_offset_distance) ? -1 : 1; + } + } + +private: + std::shared_ptr m_tree_ptr; + std::shared_ptr m_side_of_ptr; + const bool m_is_inset; + const double m_sq_offset_distance; + const bool m_is_closed; +}; + +template +class Polygon_soup_offset_function +{ + using Polygon_iterator = typename Polygons::const_iterator; + + class Polygon_soup_point_property_map + { + const Points* points_vector_ptr; + + public: + using key_type = Polygon_iterator; + using value_type = EPICK::Point_3; + using reference = const value_type&; + using category = boost::readable_property_map_tag; + + Polygon_soup_point_property_map() = default; + Polygon_soup_point_property_map(const Points* ptr) : points_vector_ptr(ptr) { } + + friend reference get(Polygon_soup_point_property_map map, + key_type polygon_it) + { + return (*map.points_vector_ptr)[*polygon_it->begin()]; + } + }; + + class Polygon_soup_triangle_property_map + { + const Points* points_vector_ptr; + + public: + using key_type = Polygon_iterator; + using value_type = EPICK::Triangle_3; + using reference = value_type; + using category = boost::readable_property_map_tag; + + Polygon_soup_triangle_property_map() = default; + Polygon_soup_triangle_property_map(const Points* ptr) : points_vector_ptr(ptr) { } + + friend value_type get(Polygon_soup_triangle_property_map map, + key_type polygon_it) + { + auto it = polygon_it->begin(); + CGAL_assertion(it != polygon_it->end()); + const auto id0 = *it++; + CGAL_assertion(it != polygon_it->end()); + const auto id1 = *it++; + CGAL_assertion(it != polygon_it->end()); + const auto id2 = *it++; + CGAL_assertion(it == polygon_it->end()); + + return value_type((*map.points_vector_ptr)[id0], + (*map.points_vector_ptr)[id1], + (*map.points_vector_ptr)[id2]); + } + }; + + struct AABB_polygon_soup_triangle_primitive + : public CGAL::AABB_primitive + { + using Base = CGAL::AABB_primitive; + + using Id = Polygon_iterator; + + template + AABB_polygon_soup_triangle_primitive(Id id, + ObjectPmap&& opmap, + PointPmap&& ppmap) + : Base(id, std::forward(opmap), std::forward(ppmap)) + { + } + + template + AABB_polygon_soup_triangle_primitive(Iterator it, + ObjectPmap&& opmap, + PointPmap&& ppmap) + : Base(*it, std::forward(opmap), std::forward(ppmap)) + { + } + }; // struct template Polygon_soup_primitive + + using AABB_traits = CGAL::AABB_traits; + using AABB_tree = CGAL::AABB_tree; + + std::shared_ptr m_tree_ptr; + double m_sq_offset_distance; + +public: + Polygon_soup_offset_function(const Points& points, + const Polygons& polygons, + const double offset_distance) + : m_tree_ptr(std::make_shared(std::begin(polygons), + std::end(polygons), + Polygon_soup_triangle_property_map(&points), + Polygon_soup_point_property_map(&points))), + m_sq_offset_distance(square(offset_distance)) + { + CGAL_assertion(!m_tree_ptr->empty()); + } + + // we only need negative inside, and positive outside, so we can compare square roots + double operator()(const EPICK::Point_3& p) const + { + // it's a soup so it's open by definition ==> treat inset and outset identically + const double sq_distance = m_tree_ptr->squared_distance(p); + return sq_distance - m_sq_offset_distance; + } + +}; // class Polygon_soup_offset_function + +} // namespace CGAL + +CGAL::Offset_function +offset_function(Scene_surface_mesh_item* item, double offset_value) +{ + return { *(item->face_graph()), offset_value }; +} + +CGAL::Polygon_soup_offset_function +offset_function(Scene_polygon_soup_item* item, double offset_value) +{ + return { item->points(), item->polygons(), offset_value }; +} + +class MeshGuard +{ + SMesh* mesh; + bool done; + +public: + MeshGuard(SMesh* mesh) : mesh(mesh), done(false) { } + void setDone() { done = true; } + ~MeshGuard() + { + if(!done) + delete mesh; + } +}; + +// declare the CGAL function +template +SMesh* cgal_off_meshing(QWidget*, + SourceItem* source_item, + Scene_polylines_item* polylines_item, + const double offset_value, + const double angle, + const double sizing, + const double approx, + const double edge_size, + int tag) +{ + using GT = EPICK; + using Sphere_3 = GT::Sphere_3; + + using Mesh_domain_base = CGAL::Labeled_mesh_domain_3; + using Mesh_domain = CGAL::Mesh_domain_with_polyline_features_3; + using Tr = C3t3::Triangulation; + using Mesh_criteria = CGAL::Mesh_criteria_3; + + const CGAL::Bbox_3 bbox = source_item->bbox(); + + const GT::Point_3 center((bbox.xmax() + bbox.xmin()) / 2, + (bbox.ymax() + bbox.ymin()) / 2, + (bbox.zmax() + bbox.zmin()) / 2); + const double rad = 0.6 * std::sqrt(CGAL::square(bbox.xmax() - bbox.xmin()) + + CGAL::square(bbox.ymax() - bbox.ymin()) + + CGAL::square(bbox.zmax() - bbox.zmin())) + + offset_value; + const double sqrad = CGAL::square(rad); + + CGAL::Timer timer; + timer.start(); + + namespace p = CGAL::parameters; + + Mesh_domain domain = + Mesh_domain::create_implicit_mesh_domain + (p::function = offset_function(source_item, offset_value), + p::bounding_object = Sphere_3(center, sqrad), + p::relative_error_bound = 1e-7, + p::construct_surface_patch_index = [](int i, int j) { return (i * 1000 + j); }); + + const CGAL::Mesh_facet_topology topology = CGAL::FACET_VERTICES_ON_SAME_SURFACE_PATCH; + auto manifold_option = p::non_manifold(); + if(tag == 1) + manifold_option = p::manifold_with_boundary(); + if(tag == 2) + manifold_option = p::manifold(); + + Mesh_criteria criteria(p::facet_angle = angle, + p::facet_size = sizing, + p::facet_distance = approx, + p::facet_topology = topology, + p::edge_size = edge_size); + + if(polylines_item != nullptr) + { + typedef std::vector Surface_patch_ids; + std::vector surface_patch_ids; + + domain.add_features_and_incidences(polylines_item->polylines.begin(), + polylines_item->polylines.end(), + CGAL::Identity_property_map(), + CGAL::Constant_property_map(surface_patch_ids)); + } + + C3t3 c3t3 = CGAL::make_mesh_3(domain, criteria, + p::no_perturb(), + p::no_exude(), + manifold_option); + + timer.stop(); + std::cerr << "done (" << timer.time() << " ms, " << c3t3.triangulation().number_of_vertices() << " vertices)" << std::endl; + + if(c3t3.number_of_facets_in_complex() > 0) + { + SMesh* pRemesh = new SMesh(); + + // if the thread is interrupted before the mesh is returned, delete it. + MeshGuard guard(pRemesh); + CGAL::facets_in_complex_3_to_triangle_mesh(c3t3, *pRemesh); + guard.setDone(); + + CGAL_postcondition(CGAL::Polygon_mesh_processing::is_outward_oriented(*pRemesh)); + + return pRemesh; + } + else + { + return nullptr; + } +} + +struct Mesher_thread + : public QThread +{ + Q_OBJECT + +private: + Scene_surface_mesh_item* sm_item; + Scene_polygon_soup_item* soup_item; + Scene_polylines_item* polylines_item; + + const double offset_value; + const double angle; + const double sizing; + const double approx; + const double edge_size; + int tag_index; + +public: + Mesher_thread(Scene_surface_mesh_item* sm_item, + Scene_polygon_soup_item* soup_item, + Scene_polylines_item* polylines_item, + const double offset_value, + const double angle, + const double sizing, + const double approx, + const double edge_size, + int tag) + : sm_item(sm_item), soup_item(soup_item), polylines_item(polylines_item), + offset_value(offset_value), + angle(angle), sizing(sizing), approx(approx), edge_size(edge_size), tag_index(tag) + { + } + + void run() override + { + SMesh* offset_mesh = nullptr; + + if(soup_item) + { + offset_mesh = cgal_off_meshing(Three::mainWindow(), + soup_item, polylines_item, + offset_value, + angle, sizing, approx, edge_size, tag_index); + } + else + { + offset_mesh = cgal_off_meshing(Three::mainWindow(), + sm_item, polylines_item, + offset_value, + angle, sizing, approx, edge_size, tag_index); + } + + Three::getMutex()->lock(); + Three::getWaitCondition()->wakeAll(); + Three::getMutex()->unlock(); + + Q_EMIT resultReady(offset_mesh); + } + +Q_SIGNALS: + void resultReady(SMesh *offset_mesh); +}; + +class Polyhedron_demo_offset_meshing_plugin + : public QObject, + protected Polyhedron_demo_plugin_interface +{ + Q_OBJECT + Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface) + Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0") + +private: + QAction* actionOffsetMeshing; + QAction* actionInflateMesh; + + Scene_interface *scene; + QMainWindow *mw; + +public: + void init(QMainWindow* mainWindow, + Scene_interface* scene_interface, + Messages_interface*) + { + this->scene = scene_interface; + this->mw = mainWindow; + + actionOffsetMeshing = new QAction(tr("Offset Meshing"), mw); + actionOffsetMeshing->setProperty("subMenuName", "3D Surface Mesh Generation"); + connect(actionOffsetMeshing, SIGNAL(triggered()), + this, SLOT(offset_meshing())); + + actionInflateMesh = new QAction(tr("Inflate Mesh"), mw); + actionInflateMesh->setProperty("subMenuName", "Operations on Polyhedra"); + connect(actionInflateMesh, SIGNAL(triggered()), + this, SLOT(inflate_mesh())); + } + + bool applicable(QAction* action) const + { + if(action == actionOffsetMeshing) + { + if(scene->selectionIndices().size() == 1) + { + const int index = scene->mainSelectionIndex(); + return (qobject_cast(scene->item(index)) || + qobject_cast(scene->item(index))); + } + + // Can provide a polyline item for feature protection + if(scene->selectionIndices().size() != 2) + return false; + + // One needs to be a surface mesh or polygon soup item, and the other a polyline item + const int index1 = scene->selectionIndices().at(0); + const int index2 = scene->selectionIndices().at(1); + Scene_item* item1 = scene->item(index1); + Scene_item* item2 = scene->item(index2); + + if((qobject_cast(item1) || + qobject_cast(item1)) && + qobject_cast(item2)) + return true; + + if((qobject_cast(item2) || + qobject_cast(item2)) && + qobject_cast(item1)) + return true; + } + else if(action == actionInflateMesh) + { + if(scene->selectionIndices().size() == 1) + { + const int index = scene->mainSelectionIndex(); + return qobject_cast(scene->item(index)); + } + } + + return false; + } + + QList actions() const + { + return QList() << actionOffsetMeshing + << actionInflateMesh; + } + +public Q_SLOTS: + void offset_meshing(); + void inflate_mesh(); +}; // class Polyhedron_demo_offset_meshing_plugin + +void +Polyhedron_demo_offset_meshing_plugin:: +offset_meshing() +{ + Scene_item* item = nullptr; + Scene_surface_mesh_item* sm_item = nullptr; + Scene_polygon_soup_item* soup_item = nullptr; + Scene_polylines_item* polylines_item = nullptr; + + bool mesh_or_soup_item_found = false; + Q_FOREACH(Scene_interface::Item_id index, scene->selectionIndices()) + { + if(!mesh_or_soup_item_found) + { + sm_item = qobject_cast(scene->item(index)); + if(sm_item == nullptr) + { + soup_item = qobject_cast(scene->item(index)); + if(soup_item != nullptr) + { + item = scene->item(index); + mesh_or_soup_item_found = true; + continue; + } + } + else + { + item = scene->item(index); + mesh_or_soup_item_found = true; + continue; + } + } + + polylines_item = qobject_cast(scene->item(index)); + } + + QApplication::setOverrideCursor(Qt::WaitCursor); + + if(!mesh_or_soup_item_found) + return; + + if(sm_item) + { + if(!is_triangle_mesh(*(sm_item->face_graph()))) + { + QMessageBox::critical(mw, + tr("Offset Meshing"), + tr("The selected mesh is not a triangle mesh.")); + return; + } + } + else + { + for(const auto& p : soup_item->polygons()) + { + if(p.size() != 3) + { + QMessageBox::critical(mw, + tr("Offset Meshing"), + tr("The selected polygon soup is not a triangle soup.")); + return; + } + } + } + + double diag; + if(sm_item) + diag = sm_item->bboxDiagonal(); + else + diag = soup_item->bboxDiagonal(); + + QApplication::restoreOverrideCursor(); + + bool ok = true; + double offset_value = QInputDialog::getDouble(mw, + QString("Choose Offset Value"), + QString("Offset Value (use a negative number to compute the inset of a closed mesh)"), + 0.1 * diag, + - (std::numeric_limits::max)(), + (std::numeric_limits::max)(), 10, &ok); + if(!ok) + return; + + if(offset_value < 0 && (!sm_item || !is_closed(*(sm_item->face_graph())))) + { + QMessageBox::critical(mw, + tr("Offset Meshing"), + tr("Insetting is only possible for closed polygon meshes.")); + return; + } + + QDialog dialog(mw); + Ui::Offset_meshing_dialog ui; + ui.setupUi(&dialog); + ui.angle->setRange(1.0, 30.0); + + connect(ui.buttonBox, SIGNAL(accepted()), + &dialog, SLOT(accept())); + connect(ui.buttonBox, SIGNAL(rejected()), + &dialog, SLOT(reject())); + + ui.sizing->setRange(diag * 10e-6, diag); + ui.sizing->setValue(diag * 0.05); // default value + ui.approx->setRange(diag * 10e-7, diag); + ui.approx->setValue(diag * 0.005); + + if(polylines_item != nullptr) + { + ui.edge_sizing->setRange(diag * 10e-6, diag); + ui.edge_sizing->setValue(diag * 0.05); // default value + } + else + { + ui.edge_sizing->setEnabled(false); + } + + int i = dialog.exec(); + if(i == QDialog::Rejected) + return; + + const double angle = ui.angle->value(); + const double approx = ui.approx->value(); + const double sizing = ui.sizing->value(); + const double edge_size = (polylines_item != nullptr) ? ui.edge_sizing->value() : 0; + const int tag_index = ui.tags->currentIndex(); + + if(tag_index < 0) + return; + + QApplication::setOverrideCursor(Qt::BusyCursor); + + std::cerr << "mesh with:" + << "\n angle= " << angle + << "\n sizing= " << sizing + << "\n approx= " << approx + << "\n tag= " << tag_index + << std::boolalpha + << std::endl; + + Mesher_thread* worker = nullptr; + if(soup_item) + { + worker = new Mesher_thread(nullptr, soup_item, polylines_item, + offset_value, + angle, sizing, approx, edge_size, tag_index); + } + else + { + worker = new Mesher_thread(sm_item, nullptr, polylines_item, + offset_value, + angle, sizing, approx, edge_size, tag_index); + } + + connect(worker, &QThread::finished, + worker, &QObject::deleteLater); + + connect(worker, &Mesher_thread::resultReady, + this, [item, angle, sizing, approx, offset_value/* , index */](SMesh* offset_mesh) + { + if(!offset_mesh) + { + QApplication::restoreOverrideCursor(); + + Three::getMutex()->lock(); + Three::isLocked() = false; + Three::getMutex()->unlock(); + + return; + } + + Scene_surface_mesh_item* offset_item = new Scene_surface_mesh_item(offset_mesh); + offset_item->setName(tr("%1 offset %5 (%2 %3 %4)").arg(item->name()) + .arg(angle) + .arg(sizing) + .arg(approx) + .arg(offset_value)); + offset_item->setColor(Qt::magenta); + offset_item->setRenderingMode(Wireframe); + Three::scene()->addItem(offset_item); + + QApplication::restoreOverrideCursor(); + + Three::getMutex()->lock(); + Three::isLocked() = false; + Three::getMutex()->unlock(); + }); + + QMessageBox* message_box = new QMessageBox(QMessageBox::NoIcon, + "Meshing", + "Offset meshing in progress...", + QMessageBox::Cancel, + mw); + message_box->setDefaultButton(QMessageBox::Cancel); + QAbstractButton* cancelButton = message_box->button(QMessageBox::Cancel); + cancelButton->setText(tr("Stop")); + + connect(cancelButton, &QAbstractButton::clicked, + this, [worker](){ worker->terminate(); }); + connect(worker, &Mesher_thread::finished, + message_box, &QMessageBox::close); + + Three::getMutex()->lock(); + Three::isLocked() = true; + Three::getMutex()->unlock(); + + message_box->open(); + worker->start(); +} + +void +Polyhedron_demo_offset_meshing_plugin:: +inflate_mesh() +{ + const Scene_interface::Item_id index = scene->mainSelectionIndex(); + Scene_item* item = scene->item(index); + if(item == nullptr) + return; + + Scene_surface_mesh_item* sm_item = qobject_cast(item); + if(sm_item == nullptr) + return; + + SMesh* sMesh = sm_item->face_graph(); + if(sMesh == nullptr) + return; + + const double diag = sm_item->bboxDiagonal(); + + bool ok = true; + const double offset_value = QInputDialog::getDouble(mw, + QString("Choose Inflate Distance"), + QString("Inflate Distance (use a negative number to deflate)"), + 0.1 * diag, + -(std::numeric_limits::max)(), + (std::numeric_limits::max)(), + 10, + &ok); + if(!ok) + return; + + auto vpm = get(CGAL::vertex_point, *sMesh); + auto vnm = sMesh->property_map("v:normal").first; + + QApplication::setOverrideCursor(Qt::WaitCursor); + + for(const auto& v : vertices(*sMesh)) + { + const EPICK::Vector_3& n = get(vnm, v); + put(vpm, v, get(vpm, v) + offset_value * n); + } + + sm_item->invalidateOpenGLBuffers(); + sm_item->itemChanged(); + sm_item->itemVisibilityChanged(); + + QApplication::restoreOverrideCursor(); +} + +#include "Offset_meshing_plugin.moc" + +#endif // CGAL_POLYHEDRON_DEMO_USE_SURFACE_MESHER diff --git a/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/CMakeLists.txt b/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/CMakeLists.txt index 508716a21e1..845dedbc31f 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/CMakeLists.txt @@ -41,18 +41,6 @@ if(NOT CGAL_DISABLE_GMP) polyhedron_demo_plugin(mesh_simplification_plugin Mesh_simplification_plugin ${mesh_simplificationUI_FILES}) target_link_libraries(mesh_simplification_plugin PUBLIC scene_surface_mesh_item scene_selection_item) - qt5_wrap_ui(remeshingUI_FILES Remeshing_dialog.ui) - polyhedron_demo_plugin(offset_meshing_plugin Offset_meshing_plugin - ${remeshingUI_FILES}) - target_link_libraries(offset_meshing_plugin PUBLIC scene_surface_mesh_item - scene_polygon_soup_item - scene_polylines_item) - if(TARGET CGAL::Eigen3_support) - target_link_libraries(offset_meshing_plugin PUBLIC CGAL::Eigen3_support) - endif() - if(TARGET CGAL::TBB_support) - target_link_libraries(offset_meshing_plugin PUBLIC CGAL::TBB_support) - endif() qt5_wrap_ui(shortestPathUI_FILES Shortest_path_widget.ui) polyhedron_demo_plugin(shortest_path_plugin Shortest_path_plugin diff --git a/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Offset_meshing_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Offset_meshing_plugin.cpp deleted file mode 100644 index 860cc2d66e9..00000000000 --- a/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Offset_meshing_plugin.cpp +++ /dev/null @@ -1,691 +0,0 @@ -#include "config.h" -#ifdef CGAL_POLYHEDRON_DEMO_USE_SURFACE_MESHER -#include -#include "ui_Remeshing_dialog.h" - -#include -#include -#include -#include -#include -#include -#include -#include "Scene_surface_mesh_item.h" -#include "Scene_polygon_soup_item.h" -#include "Scene_polylines_item.h" -#include -#include -#include -#include - -#include "C3t3_type.h" - -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include - -#include // std::shared_ptr - -namespace CGAL{ - -template -class Offset_function -{ - typedef AABB_face_graph_triangle_primitive Primitive; - typedef AABB_traits Traits; - typedef AABB_tree Tree; - typedef Side_of_triangle_mesh Side_of; - -public: - - Offset_function(TriangleMesh& tm, double offset_distance) - : m_tree_ptr(new Tree(boost::begin(faces(tm)), - boost::end(faces(tm)), - tm) ) - , m_side_of_ptr( new Side_of(*m_tree_ptr) ) - , m_offset_distance(offset_distance) - , m_is_closed( is_closed(tm) ) - { - CGAL_assertion(!m_tree_ptr->empty()); - } - - double operator()(const typename GeomTraits::Point_3& p) const - { - using CGAL::sqrt; - - Bounded_side side = m_is_closed?m_side_of_ptr->operator()(p):ON_UNBOUNDED_SIDE; - if (side==ON_BOUNDARY) return m_offset_distance; - - typename GeomTraits::Point_3 closest_point = m_tree_ptr->closest_point(p); - double distance = sqrt(squared_distance(p, closest_point)); - - return (side == ON_UNBOUNDED_SIDE ? -distance : distance) + m_offset_distance; - } - -private: - std::shared_ptr m_tree_ptr; - std::shared_ptr m_side_of_ptr; - double m_offset_distance; - bool m_is_closed; - -}; - -class Polygon_soup_offset_function { - typedef Scene_polygon_soup_item::Points Points; - typedef Scene_polygon_soup_item::Polygons Polygons; - - typedef Polygons::const_iterator Polygon_iterator; - - - class Polygon_soup_point_property_map { - const Points* points_vector_ptr; - public: - typedef Polygon_iterator key_type; - typedef EPICK::Point_3 value_type; - typedef const value_type& reference; - typedef boost::readable_property_map_tag category; - - Polygon_soup_point_property_map() = default; - Polygon_soup_point_property_map(const Points* ptr) - : points_vector_ptr(ptr) - {} - - friend reference get(Polygon_soup_point_property_map map, - key_type polygon_it) - { - return (*map.points_vector_ptr)[*polygon_it->begin()]; - } - }; - - - class Polygon_soup_triangle_property_map { - const Points* points_vector_ptr; - public: - typedef Polygon_iterator key_type; - typedef EPICK::Triangle_3 value_type; - typedef value_type reference; - typedef boost::readable_property_map_tag category; - - Polygon_soup_triangle_property_map() = default; - Polygon_soup_triangle_property_map(const Points* ptr) - : points_vector_ptr(ptr) - {} - - friend value_type get(Polygon_soup_triangle_property_map map, - key_type polygon_it) - { - auto it = polygon_it->begin(); - CGAL_assertion(it != polygon_it->end()); - const auto id0 = *it++; - CGAL_assertion(it != polygon_it->end()); - const auto id1 = *it++; - CGAL_assertion(it != polygon_it->end()); - const auto id2 = *it++; - CGAL_assertion(it == polygon_it->end()); - - return value_type( (*map.points_vector_ptr)[id0], - (*map.points_vector_ptr)[id1], - (*map.points_vector_ptr)[id2] ); - } - }; - - struct AABB_primitive : - public CGAL::AABB_primitive - { - typedef CGAL::AABB_primitive Base; - - typedef Polygon_iterator Id; - - template - AABB_primitive(Id id, ObjectPmap&& opmap, PointPmap&& ppmap) - : Base(id, std::forward(opmap), std::forward(ppmap)) - {} - - template - AABB_primitive(Iterator it, ObjectPmap&& opmap, PointPmap&& ppmap) - : Base(*it, std::forward(opmap), std::forward(ppmap)) - {} - }; // end struct template AABB_primitive - - - typedef CGAL::AABB_traits AABB_traits; - typedef CGAL::AABB_tree AABB_tree; - - std::shared_ptr m_tree_ptr; - double m_offset_distance; - - typedef Polygon_soup_triangle_property_map ObjectPmap; - typedef Polygon_soup_point_property_map PointPmap; -public: - Polygon_soup_offset_function(const Scene_polygon_soup_item* soup, - const double offset_distance) - : m_tree_ptr - (std::make_shared(begin(soup->polygons()), - end(soup->polygons()), - ObjectPmap(&soup->points()), - PointPmap(&soup->points())) - ) - , m_offset_distance(offset_distance) - { - CGAL_assertion(! m_tree_ptr->empty() ); - } - - double operator()(const EPICK::Point_3& p) const - { - using CGAL::sqrt; - - EPICK::Point_3 closest_point = m_tree_ptr->closest_point(p); - double distance = sqrt(squared_distance(p, closest_point)); - - return m_offset_distance - distance; - } - -}; // end class Polygon_soup_offset_function - -} //end of CGAL namespace - -Scene_surface_mesh_item* make_item(SMesh* sm) -{ - return new Scene_surface_mesh_item(sm); -} - -CGAL::Offset_function -offset_function(SMesh* surface_mesh_ptr, double offset_value) { - return { *surface_mesh_ptr, offset_value }; -} - -CGAL::Polygon_soup_offset_function -offset_function(Scene_polygon_soup_item* item, double offset_value) { - return { item, offset_value }; -} - -template -struct Result_type { - typedef T type; -}; - -template <> -struct Result_type { - typedef SMesh type; -}; - -template -CGAL::Bbox_3 bbox(Mesh* mesh_ptr) { - return CGAL::Polygon_mesh_processing::bbox(*mesh_ptr); -} - -CGAL::Bbox_3 bbox(Scene_polygon_soup_item* item) { - return item->bbox(); -} -class MeshGuard{ - SMesh* mesh; - bool done; -public: - MeshGuard(SMesh* mesh):mesh(mesh), done(false){} - void setDone(){done = true;} - ~MeshGuard(){ - if(!done) - delete mesh; - } -}; -// declare the CGAL function -template -SMesh* cgal_off_meshing(QWidget*, - Mesh* tm_ptr, - Scene_polylines_item* polylines_item, - const double offset_value, - const double angle, - const double sizing, - const double approx, - const double edge_size, - int tag) -{ - typedef EPICK GT; - typedef CGAL::Labeled_mesh_domain_3 Mesh_domain_base; - typedef CGAL::Mesh_domain_with_polyline_features_3 Mesh_domain; - typedef C3t3::Triangulation Tr; - typedef CGAL::Mesh_criteria_3 Mesh_criteria; - typedef GT::Sphere_3 Sphere_3; - - CGAL::Bbox_3 bbox = ::bbox(tm_ptr); - - GT::Point_3 center((bbox.xmax()+bbox.xmin())/2, - (bbox.ymax()+bbox.ymin())/2, - (bbox.zmax()+bbox.zmin())/2); - double sqrad = 0.6 * std::sqrt( CGAL::square(bbox.xmax()-bbox.xmin())+ - CGAL::square(bbox.ymax()-bbox.ymin())+ - CGAL::square(bbox.zmax()-bbox.zmin()) ) - + offset_value; - sqrad=CGAL::square(sqrad); - - CGAL::Timer timer; - timer.start(); - - namespace p = CGAL::parameters; - - Mesh_domain domain = - Mesh_domain::create_implicit_mesh_domain - (p::function = offset_function(tm_ptr, offset_value), - p::bounding_object = Sphere_3(center, sqrad), - p::relative_error_bound = 1e-7, - p::construct_surface_patch_index = [](int i, int j) { return (i * 1000 + j); }); - - const CGAL::Mesh_facet_topology topology = CGAL::FACET_VERTICES_ON_SAME_SURFACE_PATCH; - auto manifold_option = p::non_manifold(); - if(tag == 1) manifold_option = p::manifold_with_boundary(); - if(tag == 2) manifold_option = p::manifold(); - Mesh_criteria criteria(p::facet_angle = angle, - p::facet_size = sizing, - p::facet_distance = approx, - p::facet_topology = topology, - p::edge_size = edge_size); - - if (polylines_item!=nullptr) - { - typedef std::vector Surface_patch_ids; - std::vector surface_patch_ids; - - domain.add_features_and_incidences(polylines_item->polylines.begin(), - polylines_item->polylines.end(), - CGAL::Identity_property_map(), - CGAL::Constant_property_map( - surface_patch_ids)); - } - - C3t3 c3t3 = CGAL::make_mesh_3(domain, criteria, - p::no_perturb(), - p::no_exude(), - manifold_option); - - const Tr& tr = c3t3.triangulation(); - - timer.stop(); - std::cerr << "done (" << timer.time() << " ms, " << tr.number_of_vertices() << " vertices)" << std::endl; - - if(tr.number_of_vertices() > 0) - { - typedef typename Result_type::type Result_mesh; - // add remesh as new polyhedron - Result_mesh *pRemesh = new Result_mesh; - //if the thread is interrupted before the mesh is returned, delete it. - MeshGuard guard(pRemesh); - CGAL::facets_in_complex_3_to_triangle_mesh(c3t3, *pRemesh); - guard.setDone(); - if(CGAL::is_closed(*pRemesh) - && ! CGAL::Polygon_mesh_processing::is_outward_oriented(*pRemesh)) - { - CGAL::Polygon_mesh_processing::reverse_face_orientations(*pRemesh); - } - - return pRemesh; - } - else - return nullptr; -} - -struct Mesher_thread:public QThread{ - Q_OBJECT - -private: - SMesh* sMesh; - Scene_polygon_soup_item* soup_item; - Scene_polylines_item* polylines_item; - const double offset_value; - const double angle; - const double sizing; - const double approx; - const double edge_size; - int tag_index; -public: - Mesher_thread( SMesh* tm_ptr, - Scene_polygon_soup_item* soup_item, - Scene_polylines_item* polylines_item, - const double offset_value, - const double angle, - const double sizing, - const double approx, - const double edge_size, - int tag) - :sMesh(tm_ptr), soup_item(soup_item), polylines_item(polylines_item), - offset_value(offset_value), angle(angle), - sizing(sizing), approx(approx), edge_size(edge_size), tag_index(tag){ - } - void run() override { - SMesh* new_mesh= nullptr; - if(soup_item) - new_mesh = cgal_off_meshing(CGAL::Three::Three::mainWindow(), - soup_item, - polylines_item, - offset_value, - angle, - sizing, - approx, - edge_size, - tag_index); - else - new_mesh = cgal_off_meshing(CGAL::Three::Three::mainWindow(), - sMesh, - polylines_item, - offset_value, - angle, - sizing, - approx, - edge_size, - tag_index); - CGAL::Three::Three::getMutex()->lock(); - CGAL::Three::Three::getWaitCondition()->wakeAll(); - CGAL::Three::Three::getMutex()->unlock(); - Q_EMIT resultReady(new_mesh); - } -Q_SIGNALS: - void resultReady(SMesh *new_mesh); -}; - -using namespace CGAL::Three; -class Polyhedron_demo_offset_meshing_plugin : - public QObject, - protected Polyhedron_demo_plugin_interface -{ - Q_OBJECT - Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface) - Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0") - -public: - void init(QMainWindow* mainWindow, CGAL::Three::Scene_interface* scene_interface, Messages_interface*) { - this->scene = scene_interface; - this->mw = mainWindow; - actionOffsetMeshing = new QAction(tr("Offset Meshing"), mw); - actionOffsetMeshing->setProperty("subMenuName", "3D Surface Mesh Generation"); - if(actionOffsetMeshing) { - connect(actionOffsetMeshing, SIGNAL(triggered()), - this, SLOT(offset_meshing())); - } - - actionInflateMesh= new QAction(tr("Inflate Mesh"), mw); - actionInflateMesh->setProperty("subMenuName", "Operations on Polyhedra"); - if(actionInflateMesh) { - connect(actionInflateMesh, SIGNAL(triggered()), - this, SLOT(inflate_mesh())); - } - } - - bool applicable(QAction*) const { - if ( scene->selectionIndices().size() != 1 && - scene->selectionIndices().size() != 2 ) - { - return false; - } - - Q_FOREACH(CGAL::Three::Scene_interface::Item_id index, scene->selectionIndices()) - { - if ( qobject_cast(scene->item(index)) || - qobject_cast(scene->item(index)) ) - return true; - } - return false; - } - - QList actions() const { - return QList() << actionOffsetMeshing - << actionInflateMesh; - } -public Q_SLOTS: - void offset_meshing(); - void inflate_mesh(); - -private: - QAction* actionOffsetMeshing; - QAction* actionInflateMesh; - Scene_interface *scene; - QMainWindow *mw; -}; // end class Polyhedron_demo_offset_meshing_plugin - -void Polyhedron_demo_offset_meshing_plugin::inflate_mesh() -{ - const CGAL::Three::Scene_interface::Item_id index = scene->mainSelectionIndex(); - Scene_item* item = scene->item(index); - if(item == nullptr){ - return; - } - - Scene_surface_mesh_item* sm_item = - qobject_cast(item); - - if(sm_item == nullptr){ - return; - } - - SMesh* sMesh = sm_item->face_graph(); - - if(sMesh == nullptr){ - return; - } - - double diag = sm_item->diagonalBbox(); - double offset_value = QInputDialog::getDouble(mw, - QString("Choose Inflate Distance"), - QString("Inflate Distance (use negative number for deflate)"), - 0.1*diag, - -(std::numeric_limits::max)(), - (std::numeric_limits::max)(), 10); - - auto vpm = get(CGAL::vertex_point,*sMesh); - auto vnm = - sMesh->property_map("v:normal").first; - - for(const auto& v : vertices(*sMesh)) - { - Point_3 p = get(vpm, v); - EPICK::Vector_3 n = get(vnm, v); - n/=(CGAL::sqrt(n.squared_length())); - put(vpm, v, p + offset_value*n); - } - sm_item->invalidateOpenGLBuffers(); -} - -void Polyhedron_demo_offset_meshing_plugin::offset_meshing() -{ - Scene_surface_mesh_item* sm_item = nullptr; - Scene_polygon_soup_item* soup_item = nullptr; - Scene_polylines_item* polylines_item = nullptr; - Scene_item* item = nullptr; - - bool mesh_or_soup_item_found = false; - - Q_FOREACH(CGAL::Three::Scene_interface::Item_id index, scene->selectionIndices()) - { - if (!mesh_or_soup_item_found) - { - sm_item = qobject_cast(scene->item(index)); - if (sm_item == nullptr) - { - soup_item = qobject_cast(item); - if (soup_item != nullptr) - { - item=scene->item(index); - mesh_or_soup_item_found = true; - continue; - } - } - else - { - item=scene->item(index); - mesh_or_soup_item_found = true; - continue; - } - } - polylines_item = qobject_cast(scene->item(index)); - } - - SMesh* sMesh = nullptr; - double diag = 0; - Scene_item::Bbox box; - if(sm_item) - { - sMesh = sm_item->face_graph(); - if(!sMesh) - return; - box = bbox(sMesh); - } - else if(soup_item != nullptr) - { - box = bbox(soup_item); - } - else if(soup_item == nullptr) - return; - double X=(box.max)(0)-(box.min)(0), - Y = (box.max)(1)-(box.min)(1), - Z = (box.max)(2)-(box.min)(2); - diag = CGAL::sqrt(X*X+Y*Y+Z*Z); - double offset_value = QInputDialog::getDouble(mw, - QString("Choose Offset Value"), - QString("Offset Value (use negative number for inset)"), - 0.1*diag, - -(std::numeric_limits::max)(), - (std::numeric_limits::max)(), 10); - - QDialog dialog(mw); - Ui::Remeshing_dialog ui; - ui.setupUi(&dialog); - ui.angle->setRange(1.0, 30.0); - connect(ui.buttonBox, SIGNAL(accepted()), - &dialog, SLOT(accept())); - connect(ui.buttonBox, SIGNAL(rejected()), - &dialog, SLOT(reject())); - - ui.sizing->setRange(diag * 10e-6, // min - diag); // max - ui.sizing->setValue(diag * 0.05); // default value - - ui.approx->setRange(diag * 10e-7, // min - diag); // max - ui.approx->setValue(diag * 0.005); - - if (polylines_item!=nullptr) - { - ui.edge_sizing->setRange(diag * 10e-6, // min - diag); // max - ui.edge_sizing->setValue(diag * 0.05); // default value - } - else - ui.edge_sizing->setEnabled(false); - - int i = dialog.exec(); - if(i == QDialog::Rejected) - return; - - const double angle = ui.angle->value(); - const double approx = ui.approx->value(); - const double sizing = ui.sizing->value(); - const double edge_size=polylines_item!=nullptr?ui.edge_sizing->value():0; - const int tag_index = ui.tags->currentIndex(); - - if(tag_index < 0) return; - - QApplication::setOverrideCursor(Qt::WaitCursor); - - std::cerr << "mesh with:" - << "\n angle=" << angle - << "\n sizing=" << sizing - << "\n approx=" << approx - << "\n tag=" << tag_index - << std::boolalpha - << std::endl; - Mesher_thread* worker = nullptr; - if(soup_item) - worker = new Mesher_thread(nullptr, - soup_item, - polylines_item, - offset_value, - angle, - sizing, - approx, - edge_size, - tag_index); - else - worker = new Mesher_thread(sMesh, - nullptr, - polylines_item, - offset_value, - angle, - sizing, - approx, - edge_size, - tag_index); - connect(worker, &QThread::finished, worker, &QObject::deleteLater); - connect(worker, &Mesher_thread::resultReady, this, - [item, angle, sizing, approx, offset_value/* , index */] - (SMesh *new_mesh){ - QApplication::restoreOverrideCursor(); - if(!new_mesh){ - CGAL::Three::Three::getMutex()->lock(); - CGAL::Three::Three::isLocked() = false; - CGAL::Three::Three::getMutex()->unlock(); - return; - } - Scene_surface_mesh_item* new_item = new Scene_surface_mesh_item(new_mesh); - new_item->setName(tr("%1 offset %5 (%2 %3 %4)") - .arg(item->name()) - .arg(angle) - .arg(sizing) - .arg(approx) - .arg(offset_value)); - new_item->setColor(Qt::magenta); - new_item->setWireframeMode(); - CGAL::Three::Three::scene()->addItem(new_item); -// CGAL::Three::Three::scene()->itemChanged(index); - QApplication::restoreOverrideCursor(); - CGAL::Three::Three::getMutex()->lock(); - CGAL::Three::Three::isLocked() = false; - CGAL::Three::Three::getMutex()->unlock(); - }); - QMessageBox* message_box = new QMessageBox(QMessageBox::NoIcon, - "Meshing", - "Offset meshing in progress...", - QMessageBox::Cancel, - mw); - message_box->setDefaultButton(QMessageBox::Cancel); - QAbstractButton* cancelButton = message_box->button(QMessageBox::Cancel); - cancelButton->setText(tr("Stop")); - - connect(cancelButton, &QAbstractButton::clicked, - this, [worker](){ - worker->terminate(); - QApplication::restoreOverrideCursor();//waitcursor - QApplication::restoreOverrideCursor();//busycursor - }); - connect(worker, &Mesher_thread::finished, - message_box, &QMessageBox::close); - message_box->open(); - - QApplication::setOverrideCursor(Qt::BusyCursor); - CGAL::Three::Three::getMutex()->lock(); - CGAL::Three::Three::isLocked() = true; - CGAL::Three::Three::getMutex()->unlock(); - worker->start(); -} - -#include "Offset_meshing_plugin.moc" - -#endif // CGAL_POLYHEDRON_DEMO_USE_SURFACE_MESHER From 5459870e311be1302ad823ed7f25aed217c8d8a0 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Tue, 13 Jun 2023 14:18:02 +0200 Subject: [PATCH 07/22] create a new CMake function CGAL_setup_CGAL_flags That new CMake function will ease the work with the Conan CGAL package. --- .../cmake/modules/CGAL_SetupCGALDependencies.cmake | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Installation/cmake/modules/CGAL_SetupCGALDependencies.cmake b/Installation/cmake/modules/CGAL_SetupCGALDependencies.cmake index 7329be33116..fb5e92371e6 100644 --- a/Installation/cmake/modules/CGAL_SetupCGALDependencies.cmake +++ b/Installation/cmake/modules/CGAL_SetupCGALDependencies.cmake @@ -97,9 +97,6 @@ function(CGAL_setup_CGAL_dependencies target) target_compile_definitions(${target} INTERFACE CGAL_TEST_SUITE=1) endif() - # CGAL now requires C++14. `decltype(auto)` is used as a marker of C++14. - target_compile_features(${target} INTERFACE cxx_decltype_auto) - use_CGAL_Boost_support(${target} INTERFACE) # Make CGAL depend on threads-support (for Epeck and Epeck_d) @@ -119,6 +116,14 @@ function(CGAL_setup_CGAL_dependencies target) target_link_options(${target} INTERFACE -fsanitize=address) endif() # Now setup compilation flags + CGAL_setup_CGAL_flags(${target}) +endfunction() + +function(CGAL_setup_CGAL_flags target) + # CGAL now requires C++14. `decltype(auto)` is used as a marker of + # C++14. + target_compile_features(${target} INTERFACE cxx_decltype_auto) + if(MSVC) target_compile_options(${target} INTERFACE "-D_SCL_SECURE_NO_DEPRECATE;-D_SCL_SECURE_NO_WARNINGS") From 7a101937c68337bfa3cc224d32948b1d3f2d8980 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 13 Jun 2023 17:04:39 +0200 Subject: [PATCH 08/22] disable verbosity of `build_triangulation_from_file` - too verbose --- Polyhedron/demo/Polyhedron/Plugins/Mesh_3/C3t3_io_plugin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/C3t3_io_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/C3t3_io_plugin.cpp index 7a889e4da14..9139fdd2590 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/C3t3_io_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/C3t3_io_plugin.cpp @@ -138,7 +138,7 @@ Polyhedron_demo_c3t3_binary_io_plugin::load( item->set_valid(false); if(CGAL::SMDS_3::build_triangulation_from_file(in, item->c3t3().triangulation(), - /*verbose = */true, /*replace_subdomain_0 = */false, /*allow_non_manifold = */true)) + /*verbose = */false, /*replace_subdomain_0 = */false, /*allow_non_manifold = */true)) { update_c3t3(item->c3t3()); From c4eb65d71bac0982e7bab1cc175e98c1f7c792d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 13 Jun 2023 19:01:35 +0200 Subject: [PATCH 09/22] disable MSVC 2015 --- Scripts/developer_scripts/autotest_cgal | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Scripts/developer_scripts/autotest_cgal b/Scripts/developer_scripts/autotest_cgal index ab124cf51e2..c984ac9ae23 100755 --- a/Scripts/developer_scripts/autotest_cgal +++ b/Scripts/developer_scripts/autotest_cgal @@ -429,6 +429,13 @@ setup_dirs() for PLATFORM in ${PLATFORMS}; do + # MSVC2015 does not support C++17 + if [ "$CGAL_RELEASE_ID" \> "CGAL-6.0" ]; then + if [ "$PLATFORMS" = "MSVC2015-Release-64bits" ]; then + continue + fi + fi + CGAL_BINARY_DIR=${CGAL_BINARY_DIR_BASE}/${PLATFORM} if [ ! -d "${CGAL_BINARY_DIR}" ]; then From f18f64956275ee27469c03a46d14e7536fc70d60 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Wed, 14 Jun 2023 15:59:39 +0200 Subject: [PATCH 10/22] announcement of CGAL-5.6-beta1 --- .../announcement/announcement-beta.md | 115 ++++++--- .../announcement/mailing-beta.eml | 227 ++++++++++-------- 2 files changed, 209 insertions(+), 133 deletions(-) diff --git a/Maintenance/public_release/announcement/announcement-beta.md b/Maintenance/public_release/announcement/announcement-beta.md index 744bd37df84..72057d53540 100644 --- a/Maintenance/public_release/announcement/announcement-beta.md +++ b/Maintenance/public_release/announcement/announcement-beta.md @@ -1,62 +1,103 @@ -The CGAL Open Source Project is pleased to announce the release 5.5 Beta 1 of CGAL, the Computational Geometry Algorithms Library. +The CGAL Open Source Project is pleased to announce the release 5.6 Beta 1 of CGAL, the Computational Geometry Algorithms Library. -CGAL version 5.5 Beta 1 is a public testing release. It should provide a solid ground to report bugs that need to be tackled before the release of the final version of CGAL 5.5 in July 2022. +CGAL version 5.6 Beta 1 is a public testing release. It should provide a solid ground to report bugs that need to be tackled before the release of the final version of CGAL 5.6 in July 2022. -Besides fixes and general enhancement to existing packages, the following has changed since CGAL 5.4: +Besides fixes and general enhancement to existing packages, the following has changed since CGAL 5.5: -### [3D Alpha Wrapping (new package)](https://doc.cgal.org/5.5/Manual/packages.html#PkgAlphaWrap3) +### General Changes -- This component takes a 3D triangle mesh, soup, or point set as input, and generates a valid (watertight, intersection-free, and combinatorially 2-manifold) surface triangle mesh that contains the input. - The algorithm proceeds by shrink-wrapping and refining a 3D Delaunay triangulation, starting from a loose bounding box of the input. - Two user-defined parameters, alpha and offset, offer control over the maximum size of cavities where the shrink-wrapping process can enter, and the tightness of the final surface mesh to the input, respectively. Once combined, these parameters provide a means to trade fidelity - to the input for complexity of the output. +- **Breaking change**: Package-specific assertions, preconditions, and postconditions (such as `CGAL_triangulation_assertion`) have been removed. Corresponding CGAL-wide versions (such as `CGAL_assertion`) should be used instead. - See also the [announcement page](https://www.cgal.org/2022/05/18/alpha_wrap/). +### [Shape Detection](https://doc.cgal.org/5.6/Manual/packages.html#PkgShapeDetection) (major changes) -### [3D Convex Hulls](https://doc.cgal.org/5.5/Manual/packages.html#PkgConvexHull3) +- **Breaking change**: The region growing part of the package have been reworked to fix design issues introduced with the handling of `FaceGraph` models. In particular, the notion of `Item` has been introduced to reference an element in the input range of elements. Region maps now operates on `Item` and no longer on the value type of the input range. +- **Breaking change**: The method `update()` in the concept `RegionType` now returns a `Boolean` instead of `void`, that is used inside the class `Region_growing` for detecting if the input conditions for the new region are satisfied. This change affects only user-defined types of regions. +- **Breaking change**: The constructors of all models used together with the region growing algorithm now enable users to provide parameters through the [named parameters](https://doc.cgal.org/5.6/BGL/group__bgl__namedparameters.html) mechanism. +- All fitting classes in the region growing framework are now using better versions of the region conditions, more precise and faster, including the correct normal orientations. +- Added new models of the concept `RegionType` for getting linear regions in a set of 2D and 3D segments and on 2D and 3D polylines. +- Added the class `Polyline_graph` for extracting a set of polylines from a face graph, which splits this graph into a set of user-defined regions. +- Added new shapes to the Region Growing algorithm on a point set: circles in 2D, spheres in 3D, and cylinders in 3D. -- Added an [overload of the function `CGAL::convex_hull_3()`](https://doc.cgal.org/5.5/Convex_hull_3/group__PkgConvexHull3Functions.html#ga52fca4745c2ef0351063fbe66b035fd1), which writes the result in an indexed triangle set. +### [2D Straight Skeleton and Polygon Offsetting](https://doc.cgal.org/5.6/Manual/packages.html#PkgStraightSkeleton2) (major changes) +- Added weighted straight skeletons: weighted straight skeletons are a generalization of straight skeletons. Contour edges are assigned a positive weight, which can be understood as assigning a speed to the wavefront spawned from the contour edge. +- Added straight skeleton extrusion: this CGAL package now implements the extrusion of weighted straight skeletons of polygons with holes. The output is a closed, combinatorially 2-manifold surface triangle mesh. + See also the [news entry](https://www.cgal.org/2023/05/09/improved_straight_skeleton/). -### [2D Polygons](https://doc.cgal.org/5.5/Manual/packages.html#PkgPolygon2) +### [2D and 3D Linear Geometry Kernel](https://doc.cgal.org/5.6/Manual/packages.html#PkgKernel23) -- Add vertex, edge, and hole ranges. -- The concept [`GeneralPolygonWithHoles_2`](https://doc.cgal.org/5.5/Polygon/classGeneralPolygonWithHoles__2.html) now requires the nested type `Polygon_2` instead of `General_polygon_2`. +- Added the functor [`CompareAngle_3`](https://doc.cgal.org/5.6/Kernel_23/classKernel_1_1CompareAngle__3.html) to the concept [`Kernel`](https://doc.cgal.org/5.6/Kernel_23/classKernel.html) to compare an angle defined by three points to the cosinus of another angle. -### [2D Regularized Boolean Set-Operations](https://doc.cgal.org/5.5/Manual/packages.html#PkgBooleanSetOperations2) -- The concept [`GeneralPolygonSetTraits_2`](https://doc.cgal.org/5.5/Boolean_set_operations_2/classGeneralPolygonSetTraits__2.html) now requires the nested type `Construct_polygon_with_holes_2` instead of `Construct_general_polygon_with_holes_2`. +### [Combinatorial Maps](https://doc.cgal.org/5.6/Manual/packages.html#PkgCombinatorialMaps), [Generalized Maps](https://doc.cgal.org/5.6/Manual/packages.html#PkgGeneralizedMaps), and [Linear Cell Complex](https://doc.cgal.org/5.6/Manual/packages.html#PkgLinearCellComplex) -### [Combinatorial Maps](https://doc.cgal.org/5.5/Manual/packages.html#PkgCombinatorialMaps) +- Added a version that uses indices instead of handles as dart and attribute descriptors. As the indices are integers convertible from and to `std::size_t`, they can be used as index into vectors which store properties. To use the index version, `Use_index` must be defined and be equal to `CGAL::Tag_true` in the item class. -- Removed old code deprecated in CGAL 4.9 and 4.10 (global functions, and information associated with darts). +### [Linear Cell Complex](https://doc.cgal.org/5.6/Manual/packages.html#PkgLinearCellComplex) -### [2D Arrangements](https://doc.cgal.org/5.5/Manual/packages.html#PkgArrangementOnSurface2) -- Fixed the `intersect_2`, `compare_y_at_x_right`, and `compare_y_at_x_left` function objects of the traits class template [`Arr_geodesic_arc_on_sphere_traits_2`](https://doc.cgal.org/5.5/Arrangement_on_surface_2/classCGAL_1_1Arr__geodesic__arc__on__sphere__traits__2.html) that handles geodesic arcs on sphere and applied a small syntactical fix to the tracing traits. +- Added the class [`Linear_cell_complex_incremental_builder_3`](https://doc.cgal.org/5.6/Linear_cell_complex/classCGAL_1_1Linear__cell__complex__incremental__builder__3.html). -### [Tetrahedral Mesh Generation](https://doc.cgal.org/5.5/Manual/packages.html#PkgMesh3) +### [2D Arrangements](https://doc.cgal.org/5.6/Manual/packages.html#PkgArrangementOnSurface2) -- Added the function [`remove_isolated_vertices()`](https://doc.cgal.org/5.5/Mesh_3/classCGAL_1_1Mesh__complex__3__in__triangulation__3.html#ace57c4e777da457c6e33b4f6e89949ce) as a post-processing step for the tetrahedral mesh generation. +- Introduced an overload function template, namely `draw(arr)`, that renders arrangements based on the `Basic_viewer_qt` class template. As of now, only 2D arrangements on the plane induced by (i) segments, (ii) conics, and (iii) circular arcs or (linear) segments are supported. +- Improved the traits class template that handles conics, namely [`Arr_conic_traits_2`](https://doc.cgal.org/5.6/Arrangement_on_surface_2/classCGAL_1_1Arr__conic__traits__2.html). This includes the following: 1. Fixed a couple of bugs and slightly optimized some functions. 2. Introduced functionality that approximates conics with polylines. (This is used to draw conic curves.) 3. **Breaking change**: Changed the interface to generate conic curves. In the past, curves where generated directly using the constructors of the conic and x-monotone conic constructs. Now, they are constructed via function objects provided by the traits. This eliminates the constructions of temporary kernels. The old functionality is obsolete, but still supported for a limited number of versions. It depends on a static member function of the traits. In a future version this function will no longer be static, implying that the old functionality will no longer be supported. +- Introduced functionality that approximates circular segments with polylines. (This is used to draw conic curves.) -### [Polygon Mesh Processing](https://doc.cgal.org/5.5/Manual/packages.html#PkgPolygonMeshProcessing) -- Added the function [`CGAL::Polygon_mesh_processing::orient_triangle_soup_with_reference_triangle_soup()`](https://doc.cgal.org/5.5/Polygon_mesh_processing/group__PMP__orientation__grp.html#ga855b1c55c201b91ab04eebd2811a87fd), which enables re-orienting the faces of a triangle soup based on the orientation of the nearest face in a reference triangle soup. -- Added the function [`CGAL::Polygon_mesh_processing::compatible_orientations()`](https://doc.cgal.org/5.5/Polygon_mesh_processing/group__PMP__orientation__grp.html#ga9ac9b9434084b64f3304df636c3178a3), which enables to retrieve the (in)compatibility of orientations of faces from different connected components. -- Added the function [`CGAL::Polygon_mesh_processing::tangential_relaxation()`](https://doc.cgal.org/5.5/Polygon_mesh_processing/group__PMP__meshing__grp.html#ga136c659162e5360354db5879db7431b4), which applies an area-based tangential mesh smoothing to the vertices of a surface triangle mesh. -- Added the named parameter `visitor` to the function [`triangulate_hole()`](https://doc.cgal.org/5.5/Polygon_mesh_processing/group__PMP__hole__filling__grp.html#gad2d3c43bce0ef90a16530478196d7f42), which enables to track progress with callbacks. -- Added more functions in the [visitor of the corefinement based methods](https://doc.cgal.org/5.5/Polygon_mesh_processing/classPMPCorefinementVisitor.html) to track progress. +### [Polygon Mesh Processing](https://doc.cgal.org/5.6/Manual/packages.html#PkgPolygonMeshProcessing) -### [Surface Mesh Simplification](https://doc.cgal.org/5.5/Manual/packages.html#PkgSurfaceMeshSimplification) -- Introduced four variations of the Garland-Heckbert simplification algorithm based on the probabilistic approach of Trettner and Kobbelt (Fast and Robust QEF Minimization using Probabilistic Quadrics): [`GarlandHeckbert_plane_policies`](https://doc.cgal.org/5.5/Surface_mesh_simplification/classCGAL_1_1Surface__mesh__simplification_1_1GarlandHeckbert__plane__policies.html), [`GarlandHeckbert_probabilistic_plane_policies`](https://doc.cgal.org/5.5/Surface_mesh_simplification/classCGAL_1_1Surface__mesh__simplification_1_1GarlandHeckbert__probabilistic__plane__policies.html), [`GarlandHeckbert_triangle_policies`](https://doc.cgal.org/5.5/Surface_mesh_simplification/classCGAL_1_1Surface__mesh__simplification_1_1GarlandHeckbert__triangle__policies.html), and [`GarlandHeckbert_probabilistic_triangle_policies`](https://doc.cgal.org/5.5/Surface_mesh_simplification/classCGAL_1_1Surface__mesh__simplification_1_1GarlandHeckbert__probabilistic__triangle__policies.html). -- The class `GarlandHeckbert_policies` has been deprecated, `GarlandHeckbert_plane_policies` replaces it. +- Added functions [`CGAL::Polygon_mesh_processing::region_growing_of_planes_on_faces()`](https://doc.cgal.org/5.6/Polygon_mesh_processing/group__PkgPolygonMeshProcessingRef.html#ga50dcd2f6295f584d2e378b57290ae2af) and [`CGAL::Polygon_mesh_processing::detect_corners_of_regions()`](https://doc.cgal.org/5.6/Polygon_mesh_processing/group__PkgPolygonMeshProcessingRef.html#gac8e445730d718a2fc49604e865017d2e), which enable partitioning a mesh into planar regions using the region growing algorithm from the [Shape Detection](https://doc.cgal.org/5.6/Manual/packages.html#PkgShapeDetection) package. -### [Point Set Processing](https://doc.cgal.org/5.5/Manual/packages.html#PkgPointSetProcessing3) +- Added the functions [`CGAL::Polygon_mesh_processing::remesh_planar_patches()`](https://doc.cgal.org/5.6/Polygon_mesh_processing/group__PMP__meshing__grp.html#ga7fca6fa2db94560ab6d32e6a77fc35b6) and [`CGAL::Polygon_mesh_processing::remesh_almost_planar_patches()`](https://doc.cgal.org/5.6/Polygon_mesh_processing/group__PMP__meshing__grp.html#ga0e6da479548199a5d82c3cf0ed36e8a0), which can be used to remesh patches of coplanar faces in a mesh. -- A new optional named parameter, `min_points_per_cell` has been added to [`grid_simplify_point_set()`](https://doc.cgal.org/5.5/Point_set_processing_3/group__PkgPointSetProcessing3Algorithms.html#ga7757ef9b3900e42fde26f5a0ac56e20f). By adding a minimal number of points in a cell such that a point is retained, one can also filter out low density areas and outliers: in the case of densely sampled point clouds, this yields better results than using grid simplification and then outlier removal, while being very vast. The default value is `1` to keep the previous behavior as default. +- Added the function [`CGAL::Polygon_mesh_processing::surface_Delaunay_remeshing()`](https://doc.cgal.org/5.6/Polygon_mesh_processing/group__PMP__meshing__grp.html#gaff62f9415d2fe96d1d3095351f156ced), which can be used to remesh a surface triangle mesh using the Delaunay refinement algorithm from the [3D Mesh Generation](https://doc.cgal.org/5.6/Manual/packages.html#PkgMesh3) package. -### [dD Spatial Searching](https://doc.cgal.org/5.5/Manual/packages.html#PkgSpatialSearchingD) +- Added the function [`CGAL::Polygon_mesh_processing::remove_almost_degenerate_faces()`](https://doc.cgal.org/5.6/Polygon_mesh_processing/group__PMP__geometric__repair__grp.html#ga48008d2b66de8a68a7068f29db15dad6), which can be used to remove badly shaped triangles faces in a mesh. -- Added the member function [`write_graphviz()`](https://doc.cgal.org/5.5/Spatial_searching/classCGAL_1_1Kd__tree.html#ac2851b5cafb8d5cce0dc5fb107c8f13f) to the class `Kd_tree` that writes the tree in a stream in the [Graphviz](https://graphviz.org/) format. +- Added the functions [`CGAL::Polygon_mesh_processing::does_triangle_soup_self_intersect()`](https://doc.cgal.org/5.6/Polygon_mesh_processing/group__PMP__intersection__grp.html#ga4909920dc48b8285e69feb845feb1e53) and [`CGAL::Polygon_mesh_processing::triangle_soup_self_intersections()`](https://doc.cgal.org/5.6/Polygon_mesh_processing/group__PMP__intersection__grp.html#ga1c5fee17bd0d92d5a2fba77ed94d4b4d) to identify and report self-intersections in a triangle soup, similarly to existing functions on triangle meshes. -### [CGAL and the Boost Graph Library (BGL)](https://doc.cgal.org/5.5/Manual/packages.html#PkgBGL) +- Added the function [`CGAL::Polygon_mesh_processing::triangulate_polygons()`](https://doc.cgal.org/5.6/Polygon_mesh_processing/group__PMP__meshing__grp.html#ga8b7db6aa8c3e79526b594739ba926d82), which allows users to triangulate polygon soups. -- Added the function [`invert_selection()`](https://doc.cgal.org/5.5/BGL/structCGAL_1_1Face__filtered__graph.html#aa428541ebbdd35f9a6e9a3ffd60178df) in the class [`Face_filtered_graph`](https://doc.cgal.org/5.5/BGL/structCGAL_1_1Face__filtered__graph.html), which toggles the selected status of a graph: selected faces are deselected, and unselected faces are selected. +- Added a named parameter to [`CGAL::Polygon_mesh_processing::smooth_shape()`](https://doc.cgal.org/5.6/Polygon_mesh_processing/group__PMP__meshing__grp.html#ga57fa999abe8dc557003482444df2a189) to disable the scaling, which otherwise aims to compensate volume loss during smoothing. +- Deprecated the overloads of functions [`CGAL::Polygon_mesh_processing::triangulate_hole()`](https://doc.cgal.org/5.6/Polygon_mesh_processing/group__PMP__hole__filling__grp.html#ga3abdf2d0558822e85f060966b69cae98), [`CGAL::Polygon_mesh_processing::triangulate_and_refine_hole()`](https://doc.cgal.org/5.6/Polygon_mesh_processing/group__PMP__hole__filling__grp.html#ga9868fac4d9dca77462ad7828bc99d8a1), and [`CGAL::Polygon_mesh_processing::triangulate_refine_and_fair_hole()`](https://doc.cgal.org/5.6/Polygon_mesh_processing/group__PMP__hole__filling__grp.html#ga18eac756a8f8e5d5f73e645fd4e26cad) which have output iterators for vertices and faces as parameter. They are replaced by overloads with two additional named parameters. +### [2D Convex Hulls](https://doc.cgal.org/5.6/Manual/packages.html#PkgConvexHull2) + +- **Breaking change**: The concept [`ConvexHullTraits_2`](https://doc.cgal.org/5.6/Convex_hull_2/classConvexHullTraits__2.html) no longer requires the functor `Less_signed_distance_to_line_2`, but requires the functor `Compare_signed_distance_to_line_2` instead. +- The long-deprecated classes `Convex_hull_projective_xy_traits_2`, `Convex_hull_projective_xz_traits_2`, and `Convex_hull_projective_yz_traits_2` have been removed. Users should use [`Projection_traits_xy_3`](https://doc.cgal.org/5.6/Kernel_23/classCGAL_1_1Projection__traits__xy__3.html), [`Projection_traits_xz_3`](https://doc.cgal.org/5.6/Kernel_23/classCGAL_1_1Projection__traits__xz__3.html), and [`Projection_traits_yz_3`](https://doc.cgal.org/5.6/Kernel_23/classCGAL_1_1Projection__traits__yz__3.html) instead. + +### [2D Triangulations](https://doc.cgal.org/5.6/Manual/packages.html#PkgTriangulation2) + +- Added the function [`CGAL::mark_domain_in_triangulation()`](https://doc.cgal.org/5.6/Triangulation_2/group__PkgTriangulation2Miscellaneous.html#ga0409755d0eb89100810230443a85e7eb) to mark faces connected with non-constrained edges as inside of the domain based on the nesting level. + +### [2D Conforming Triangulations and Meshes](https://doc.cgal.org/5.6/Manual/packages.html#PkgMesh2) + +- Added new overloads to the function [`write_VTU()`](https://doc.cgal.org/5.6/Mesh_2/group__PkgMesh2IO.html), with property maps for specifying the domain. +- Deprecated usage of boost parameters in favor of function named parameters in [`CGAL::lloyd_optimize_mesh_2()`](https://doc.cgal.org/5.6/Mesh_2/group__PkgMesh2Functions.html#gafeaf59d3fa014da287f8514913b38d05). +- Deprecated two overloads of the function [`refine_Delaunay_mesh()`](https://doc.cgal.org/5.6/Mesh_2/group__PkgMesh2Functions.html), and replaced them with versions using function named parameters. + +### [2D Hyperbolic Triangulations](https://doc.cgal.org/5.6/Manual/packages.html#PkgHyperbolicTriangulation2) + +- **Breaking change**: the concept [`HyperbolicTriangulationFaceBase_2`](https://doc.cgal.org/5.6/Hyperbolic_triangulation_2/classHyperbolicTriangulationFaceBase__2.html) has been modified to better reflect the triangulation's requirements and avoid a conflict with the requirements described by the concept `TriangulationDataStructure_2::Face`. The model [`CGAL::Hyperbolic_triangulation_face_base_2`](https://doc.cgal.org/5.6/Hyperbolic_triangulation_2/classCGAL_1_1Hyperbolic__triangulation__face__base__2.html) has been adapted correspondingly. + +### [3D Simplicial Mesh Data Structure](https://doc.cgal.org/5.6/Manual/packages.html#PkgSMDS3) (new package) + +- This new package wraps all the existing code that deals with a [`MeshComplex_3InTriangulation_3`](https://doc.cgal.org/5.6/SMDS_3/classMeshComplex__3InTriangulation__3.html) to describe 3D simplicial meshes, and makes the data structure independent from the [tetrahedral mesh generation](https://doc.cgal.org/5.6/Manual/packages.html#PkgMesh3) package. + +### [3D Mesh Generation](https://doc.cgal.org/5.6/Manual/packages.html#PkgMesh3) + +- Added two new named parameters to the named constructor [`CGAL::create_labeled_image_mesh_domain()`](https://doc.cgal.org/5.6/Mesh_3/classCGAL_1_1Labeled__mesh__domain__3.html#aec3f58e9883a8036a1b3e379df7d8fa9) for automatic detection and protection of 1D-curves that lie at the intersection of three or more subdomains extracted from labeled images. +- Added [`CGAL::Sizing_field_with_aabb_tree`](https://doc.cgal.org/5.6/Mesh_3/structCGAL_1_1Sizing__field__with__aabb__tree.html), a geometry-aware sizing field for feature edges in polyhedral domains. +- Added new meshing criterion [`edge_min_size`](https://doc.cgal.org/5.6/Mesh_3/classCGAL_1_1Mesh__criteria__3.html#a5f1c2649cb7ea346a3b6a2a8724b4df1) to avoid subdividing sharp edges that are shorter than a prescribed size bound. +- Added new meshing criteria [`facet_min_size`](https://doc.cgal.org/5.6/Mesh_3/classCGAL_1_1Mesh__criteria__3.html#a5f1c2649cb7ea346a3b6a2a8724b4df1) and [`cell_min_size`](https://doc.cgal.org/5.6/Mesh_3/classCGAL_1_1Mesh__criteria__3.html#a5f1c2649cb7ea346a3b6a2a8724b4df1) to prevent Delaunay refinement from creating simplices smaller than a prescribed bound. +- Deprecated usage of boost parameters in favor of function named parameters. + +### [3D Periodic Mesh Generation](https://doc.cgal.org/5.6/Manual/packages.html#PkgPeriodic3Mesh3) + +- Periodic Mesh Generation now supports non-cubic domains. +- Deprecated usage of boost parameters in favor of function named parameters. + +### [Surface Mesh Simplification](https://doc.cgal.org/5.6/Manual/packages.html#PkgSurfaceMeshSimplification) +- The stop predicates [`Count_stop_predicate`](https://doc.cgal.org/5.6/Surface_mesh_simplification/classCGAL_1_1Surface__mesh__simplification_1_1Count__stop__predicate.html) and [`Count_ratio_stop_predicate`](https://doc.cgal.org/5.6/Surface_mesh_simplification/classCGAL_1_1Surface__mesh__simplification_1_1Count__ratio__stop__predicate.html) are renamed to [`Edge_count_stop_predicate`](https://doc.cgal.org/5.6/Surface_mesh_simplification/classCGAL_1_1Surface__mesh__simplification_1_1Edge__count__stop__predicate.html) and [`Edge_count_ratio_stop_predicate`](https://doc.cgal.org/5.6/Surface_mesh_simplification/classCGAL_1_1Surface__mesh__simplification_1_1Edge__count__ratio__stop__predicate.html). Older versions have been deprecated. +- Introduced [`Face_count_stop_predicate`](https://doc.cgal.org/5.6/Surface_mesh_simplification/classCGAL_1_1Surface__mesh__simplification_1_1Face__count__stop__predicate.html) and [`Face_count_ratio_stop_predicate`](https://doc.cgal.org/5.6/Surface_mesh_simplification/classCGAL_1_1Surface__mesh__simplification_1_1Face__count__ratio__stop__predicate.html), which can be used to stop the simplification algorithm based on a desired number of faces in the output, or a ratio between input and output face numbers. + +### [2D Regularized Boolean Set Operations](https://doc.cgal.org/5.6/Manual/packages.html#PkgBooleanSetOperations2) +- Exposed all required member functions of the [`GeneralPolygonWithHoles_2`](https://doc.cgal.org/5.6/Polygon/classGeneralPolygonWithHoles__2.html) concept (e.g., [`clear_outer_boundary()`](https://doc.cgal.org/5.6/Polygon/classGeneralPolygonWithHoles__2.html#a9f5f035047505a2ccab3e68770f51bc6), [`clear_holes()`](https://cgal.geometryfactory.com/CGAL/doc/master/Polygon/classGeneralPolygonWithHoles__2.html#a2a507be648f127ac605da8c670ea2580), and [`clear()`](https://doc.cgal.org/5.6/Polygon/classGeneralPolygonWithHoles__2.html#a2ca4d9b43cc9216c1b2cdb080a915944) ). diff --git a/Maintenance/public_release/announcement/mailing-beta.eml b/Maintenance/public_release/announcement/mailing-beta.eml index 11b4295f32f..f63a09adc8d 100644 --- a/Maintenance/public_release/announcement/mailing-beta.eml +++ b/Maintenance/public_release/announcement/mailing-beta.eml @@ -1,131 +1,166 @@ -Subject: CGAL 5.3.2, 5.4.1, and 5.5 Beta 1 Released, Computational Geometry Algorithms Library +Subject: CGAL 5.6 Beta 1 Released, Computational Geometry Algorithms Library Content-Type: text/plain; charset="utf-8" Body: -The CGAL Open Source Project is pleased to announce today three new -releases: +The CGAL Open Source Project is pleased to announce the release 5.6 Beta 1 of +CGAL, the Computational Geometry Algorithms Library. -- CGAL-5.3.2 is the second and last bug-fix release for CGAL-5.3, -- CGAL-5.4.1 is the first bug-fix release for CGAL-5.4, and -- CGAL-5.5-beta1 is the first beta release for CGAL-5.5. - -CGAL version 5.5 Beta 1 is a public testing release. It should provide a +CGAL version 5.6 Beta 1 is a public testing release. It should provide a solid ground to report bugs that need to be tackled before the release -of the final version of CGAL 5.5 in July 2022. +of the final version of CGAL 5.6 in July 2023. Besides fixes and general enhancement to existing packages, the -following has changed since CGAL 5.4: +following has changed since CGAL 5.5: -3D Alpha Wrapping (new package) +General Changes -- This component takes a 3D triangle mesh, soup, or point set as - input, and generates a valid (watertight, intersection-free, and - combinatorially 2-manifold) surface triangle mesh that contains the - input. The algorithm proceeds by shrink-wrapping and refining a 3D - Delaunay triangulation, starting from a loose bounding box of the - input. Two user-defined parameters, alpha and offset, offer control - over the maximum size of cavities where the shrink-wrapping process - can enter, and the tightness of the final surface mesh to the input, - respectively. Once combined, these parameters provide a means to - trade fidelity to the input for complexity of the output. +- Breaking change: Package-specific assertions, preconditions, and + postconditions (such as CGAL_triangulation_assertion) have been + removed. Corresponding CGAL-wide versions (such as CGAL_assertion) + should be used instead. - See also https://www.cgal.org/2022/05/18/alpha_wrap/. +Shape Detection (major changes) -3D Convex Hulls +- Breaking change: The region growing part of the package have been + reworked to fix design issues introduced with the handling of + FaceGraph models. In particular, the notion of Item has been + introduced to reference an element in the input range of elements. + Region maps now operates on Item and no longer on the value type of + the input range. +- Breaking change: The method update() in the concept RegionType now + returns a Boolean instead of void, that is used inside the class + Region_growing for detecting if the input conditions for the new + region are satisfied. This change affects only user-defined types of + regions. +- Breaking change: The constructors of all models used together with + the region growing algorithm now enable users to provide parameters + through the named parameters mechanism. +- All fitting classes in the region growing framework are now using + better versions of the region conditions, more precise and faster, + including the correct normal orientations. +- Added new models of the concept RegionType for getting linear + regions in a set of 2D and 3D segments and on 2D and 3D polylines. +- Added the class Polyline_graph for extracting a set of polylines + from a face graph, which splits this graph into a set of + user-defined regions. +- Added new shapes to the Region Growing algorithm on a point set: + circles in 2D, spheres in 3D, and cylinders in 3D. -- Added an overload of the function CGAL::convex_hull_3(), which - writes the result in an indexed triangle set. +2D Straight Skeleton and Polygon Offsetting (major changes) -2D Polygons +- Added weighted straight skeletons: weighted straight skeletons are a + generalization of straight skeletons. Contour edges are assigned a + positive weight, which can be understood as assigning a speed to the + wavefront spawned from the contour edge. +- Added straight skeleton extrusion: this CGAL package now implements + the extrusion of weighted straight skeletons of polygons with holes. + The output is a closed, combinatorially 2-manifold surface triangle + mesh. See also the news entry. -- Add vertex, edge, and hole ranges. -- The concept GeneralPolygonWithHoles_2 now requires the nested type - Polygon_2 instead of General_polygon_2. +Combinatorial Maps, Generalized Maps, and Linear Cell Complex -2D Regularized Boolean Set-Operations - -- The concept GeneralPolygonSetTraits_2 now requires the nested type - Construct_polygon_with_holes_2 instead of - Construct_general_polygon_with_holes_2. - -Combinatorial Maps - -- Removed old code deprecated in CGAL 4.9 and 4.10 (global functions, - and information associated with darts). +- Added a version that uses indices instead of handles as dart and + attribute descriptors. As the indices are integers convertible from + and to std::size_t, they can be used as index into vectors which + store properties. To use the index version, Use_index must be + defined and be equal to CGAL::Tag_true in the item class. 2D Arrangements -- Fixed the intersect_2, compare_y_at_x_right, and compare_y_at_x_left - function objects of the traits class template - Arr_geodesic_arc_on_sphere_traits_2 that handles geodesic arcs on - sphere and applied a small syntactical fix to the tracing traits. - -Tetrahedral Mesh Generation - -- Added the function remove_isolated_vertices() as a post-processing - step for the tetrahedral mesh generation. +- Introduced an overload function template, namely draw(arr), that + renders arrangements based on the Basic_viewer_qt class template. As + of now, only 2D arrangements on the plane induced by (i) + segments, (ii) conics, and (iii) circular arcs or (linear) segments + are supported. +- Improved the traits class template that handles conics, namely + Arr_conic_traits_2. This includes the following: 1. Fixed a couple + of bugs and slightly optimized some functions. 2. Introduced + functionality that approximates conics with polylines. (This is used + to draw conic curves.) 3. Breaking change: Changed the interface to + generate conic curves. In the past, curves where generated directly + using the constructors of the conic and x-monotone conic constructs. + Now, they are constructed via function objects provided by the + traits. This eliminates the constructions of temporary kernels. The + old functionality is obsolete, but still supported for a limited + number of versions. It depends on a static member function of the + traits. In a future version this function will no longer be static, + implying that the old functionality will no longer be supported. +- Introduced functionality that approximates circular segments with + polylines. (This is used to draw conic curves.) Polygon Mesh Processing +- Added functions + CGAL::Polygon_mesh_processing::region_growing_of_planes_on_faces() + and CGAL::Polygon_mesh_processing::detect_corners_of_regions(), + which enable partitioning a mesh into planar regions using the + region growing algorithm from the Shape Detection package. + +- Added the functions + CGAL::Polygon_mesh_processing::remesh_planar_patches() and + CGAL::Polygon_mesh_processing::remesh_almost_planar_patches(), which + can be used to remesh patches of coplanar faces in a mesh. + - Added the function - CGAL::Polygon_mesh_processing::orient_triangle_soup_with_reference_triangle_soup(), - which enables re-orienting the faces of a triangle soup based on the - orientation of the nearest face in a reference triangle soup. + CGAL::Polygon_mesh_processing::surface_Delaunay_remeshing(), which + can be used to remesh a surface triangle mesh using the Delaunay + refinement algorithm from the 3D Mesh Generation package. + - Added the function - CGAL::Polygon_mesh_processing::compatible_orientations(), which - enables to retrieve the (in)compatibility of orientations of faces - from different connected components. + CGAL::Polygon_mesh_processing::remove_almost_degenerate_faces(), + which can be used to remove badly shaped triangles faces in a mesh. + +- Added the functions + CGAL::Polygon_mesh_processing::does_triangle_soup_self_intersect() + and + CGAL::Polygon_mesh_processing::triangle_soup_self_intersections() to + identify and report self-intersections in a triangle soup, similarly + to existing functions on triangle meshes. + - Added the function - CGAL::Polygon_mesh_processing::tangential_relaxation(), which - applies an area-based tangential mesh smoothing to the vertices of a - surface triangle mesh. -- Added the named parameter visitor to the function - triangulate_hole(), which enables to track progress with callbacks. -- Added more functions in the visitor of the corefinement based - methods to track progress. + CGAL::Polygon_mesh_processing::triangulate_polygons(), which allows + users to triangulate polygon soups. -Surface Mesh Simplification +- Added a named parameter to + CGAL::Polygon_mesh_processing::smooth_shape() to disable the + scaling, which otherwise aims to compensate volume loss during + smoothing. -- Introduced four variations of the Garland-Heckbert simplification - algorithm based on the probabilistic approach of Trettner and - Kobbelt (Fast and Robust QEF Minimization using Probabilistic - Quadrics): GarlandHeckbert_plane_policies, - GarlandHeckbert_probabilistic_plane_policies, - GarlandHeckbert_triangle_policies, and - GarlandHeckbert_probabilistic_triangle_policies. -- The class GarlandHeckbert_policies has been deprecated, - GarlandHeckbert_plane_policies replaces it. - -Point Set Processing - -- A new optional named parameter, min_points_per_cell has been added - to grid_simplify_point_set(). By adding a minimal number of points - in a cell such that a point is retained, one can also filter out low - density areas and outliers: in the case of densely sampled point - clouds, this yields better results than using grid simplification - and then outlier removal, while being very vast. The default value - is 1 to keep the previous behavior as default. - -dD Spatial Searching - -- Added the member function write_graphviz() to the class Kd_tree that - writes the tree in a stream in the Graphviz format. - -CGAL and the Boost Graph Library (BGL) - -- Added the function invert_selection() in the class - Face_filtered_graph, which toggles the selected status of a graph: - selected faces are deselected, and unselected faces are selected. +- Deprecated the overloads of functions + CGAL::Polygon_mesh_processing::triangulate_hole(), + CGAL::Polygon_mesh_processing::triangulate_and_refine_hole(), and + CGAL::Polygon_mesh_processing::triangulate_refine_and_fair_hole() + which have output iterators for vertices and faces as parameter. + They are replaced by overloads with two additional named parameters. -See https://www.cgal.org/2022/06/06/cgal55-beta1/ for a +3D Mesh Generation + +- Added two new named parameters to the named constructor + CGAL::create_labeled_image_mesh_domain() for automatic detection and + protection of 1D-curves that lie at the intersection of three or + more subdomains extracted from labeled images. +- Added CGAL::Sizing_field_with_aabb_tree, a geometry-aware sizing + field for feature edges in polyhedral domains. +- Added new meshing criterion edge_min_size to avoid subdividing sharp + edges that are shorter than a prescribed size bound. +- Added new meshing criteria facet_min_size and cell_min_size to + prevent Delaunay refinement from creating simplices smaller than a + prescribed bound. +- Deprecated usage of boost parameters in favor of function named + parameters. + + +See https://www.cgal.org/2023/06/13/cgal56-beta1/ for a complete list of changes. -The development of CGAL will then now on the future CGAL-5.6 (planned -for December 2022), with bug-fixes regularly backported to the branches -for CGAL-5.4.x and CGAL-5.5.x. +The development of CGAL will then now on the future CGAL-6.0 (planned +for December 2023), with bug-fixes regularly backported to the branches +for CGAL-5.5.x and CGAL-5.6.x. +CGAL-6.0 will be the first release of CGAL requiring C++17 or later. It +will also support Qt6. The CGAL project is a collaborative effort to develop a robust, From 852b3b664b9fed1c76da2717a011cf2e1bcb7116 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Fri, 28 Apr 2023 22:40:15 +0200 Subject: [PATCH 11/22] expand -CGAL_CPP17_INLINE macro --- BGL/include/CGAL/boost/graph/internal/Has_member_clear.h | 2 +- .../include/CGAL/Box_intersection_d/segment_tree.h | 2 +- Combinatorial_map/include/CGAL/Combinatorial_map_storages.h | 4 ++-- Generalized_map/include/CGAL/Generalized_map_storages.h | 4 ++-- Installation/include/CGAL/config.h | 6 ------ .../include/CGAL/CMap_linear_cell_complex_storages.h | 4 ++-- .../include/CGAL/GMap_linear_cell_complex_storages.h | 4 ++-- STL_Extension/include/CGAL/Named_function_parameters.h | 2 +- STL_Extension/include/CGAL/type_traits/is_iterator.h | 6 +++--- Stream_support/include/CGAL/IO/helpers.h | 4 ++-- 10 files changed, 16 insertions(+), 22 deletions(-) diff --git a/BGL/include/CGAL/boost/graph/internal/Has_member_clear.h b/BGL/include/CGAL/boost/graph/internal/Has_member_clear.h index 9d0288d1171..c0e284b6574 100644 --- a/BGL/include/CGAL/boost/graph/internal/Has_member_clear.h +++ b/BGL/include/CGAL/boost/graph/internal/Has_member_clear.h @@ -29,7 +29,7 @@ public: }; template -CGAL_CPP17_INLINE constexpr bool Has_member_clear_v = Has_member_clear::value; +inline constexpr bool Has_member_clear_v = Has_member_clear::value; } // internal } // cgal diff --git a/Box_intersection_d/include/CGAL/Box_intersection_d/segment_tree.h b/Box_intersection_d/include/CGAL/Box_intersection_d/segment_tree.h index 31b1fb23dd0..43f4061a449 100644 --- a/Box_intersection_d/include/CGAL/Box_intersection_d/segment_tree.h +++ b/Box_intersection_d/include/CGAL/Box_intersection_d/segment_tree.h @@ -326,7 +326,7 @@ public: }; template -CGAL_CPP17_INLINE constexpr bool Has_member_report_v = Has_member_report::value; +inline constexpr bool Has_member_report_v = Has_member_report::value; template inline diff --git a/Combinatorial_map/include/CGAL/Combinatorial_map_storages.h b/Combinatorial_map/include/CGAL/Combinatorial_map_storages.h index cde06788e0d..3754a4439d4 100644 --- a/Combinatorial_map/include/CGAL/Combinatorial_map_storages.h +++ b/Combinatorial_map/include/CGAL/Combinatorial_map_storages.h @@ -64,7 +64,7 @@ namespace CGAL { typedef typename Dart_container::size_type size_type; typedef std::nullptr_t Null_descriptor_type; - CGAL_CPP17_INLINE static constexpr Null_descriptor_type null_descriptor=nullptr; + inline static constexpr Null_descriptor_type null_descriptor=nullptr; using Type_for_compact_container=void*; @@ -107,7 +107,7 @@ namespace CGAL { template using Attribute_const_handle=Attribute_const_descriptor; - CGAL_CPP17_INLINE static constexpr Null_descriptor_type null_handle=null_descriptor; + inline static constexpr Null_descriptor_type null_handle=null_descriptor; /// Number of marks static const size_type NB_MARKS = 32; diff --git a/Generalized_map/include/CGAL/Generalized_map_storages.h b/Generalized_map/include/CGAL/Generalized_map_storages.h index d628b153a5e..d14cc8ea17c 100644 --- a/Generalized_map/include/CGAL/Generalized_map_storages.h +++ b/Generalized_map/include/CGAL/Generalized_map_storages.h @@ -64,7 +64,7 @@ namespace CGAL { typedef typename Dart_container::size_type size_type; typedef std::nullptr_t Null_descriptor_type; - CGAL_CPP17_INLINE static constexpr Null_descriptor_type null_descriptor=nullptr; + inline static constexpr Null_descriptor_type null_descriptor=nullptr; using Type_for_compact_container=void*; @@ -107,7 +107,7 @@ namespace CGAL { template using Attribute_const_handle=Attribute_const_descriptor; - CGAL_CPP17_INLINE static constexpr Null_descriptor_type null_handle=null_descriptor; + inline static constexpr Null_descriptor_type null_handle=null_descriptor; /// Number of marks static const size_type NB_MARKS = 32; diff --git a/Installation/include/CGAL/config.h b/Installation/include/CGAL/config.h index d492dafc046..d48250f1dc1 100644 --- a/Installation/include/CGAL/config.h +++ b/Installation/include/CGAL/config.h @@ -488,12 +488,6 @@ namespace cpp11{ # define CGAL_FALLTHROUGH while(false){} #endif -#if CGAL_CXX17 -# define CGAL_CPP17_INLINE inline -#else -# define CGAL_CPP17_INLINE -#endif - #ifndef CGAL_NO_ASSERTIONS # define CGAL_NO_ASSERTIONS_BOOL false #else diff --git a/Linear_cell_complex/include/CGAL/CMap_linear_cell_complex_storages.h b/Linear_cell_complex/include/CGAL/CMap_linear_cell_complex_storages.h index e43fb279038..6e6884ecbcf 100644 --- a/Linear_cell_complex/include/CGAL/CMap_linear_cell_complex_storages.h +++ b/Linear_cell_complex/include/CGAL/CMap_linear_cell_complex_storages.h @@ -74,7 +74,7 @@ namespace CGAL { typedef typename Dart_container::size_type size_type; typedef std::nullptr_t Null_descriptor_type; - CGAL_CPP17_INLINE static constexpr Null_descriptor_type null_descriptor=nullptr; + inline static constexpr Null_descriptor_type null_descriptor=nullptr; using Type_for_compact_container=void*; @@ -128,7 +128,7 @@ namespace CGAL { using Vertex_attribute_handle=Vertex_attribute_descriptor; using Vertex_attribute_const_handle=Vertex_attribute_const_descriptor; - CGAL_CPP17_INLINE static constexpr Null_descriptor_type null_handle=null_descriptor; + inline static constexpr Null_descriptor_type null_handle=null_descriptor; /// Number of marks static const size_type NB_MARKS = 32; diff --git a/Linear_cell_complex/include/CGAL/GMap_linear_cell_complex_storages.h b/Linear_cell_complex/include/CGAL/GMap_linear_cell_complex_storages.h index 3b90e193fa2..ca73368b34a 100644 --- a/Linear_cell_complex/include/CGAL/GMap_linear_cell_complex_storages.h +++ b/Linear_cell_complex/include/CGAL/GMap_linear_cell_complex_storages.h @@ -74,7 +74,7 @@ namespace CGAL { typedef typename Dart_container::size_type size_type; typedef std::nullptr_t Null_descriptor_type; - CGAL_CPP17_INLINE static constexpr Null_descriptor_type null_descriptor=nullptr; + inline static constexpr Null_descriptor_type null_descriptor=nullptr; using Type_for_compact_container=void*; @@ -128,7 +128,7 @@ namespace CGAL { using Vertex_attribute_handle=Vertex_attribute_descriptor; using Vertex_attribute_const_handle=Vertex_attribute_const_descriptor; - CGAL_CPP17_INLINE static constexpr Null_descriptor_type null_handle=null_descriptor; + inline static constexpr Null_descriptor_type null_handle=null_descriptor; /// Number of marks static const size_type NB_MARKS = 32; diff --git a/STL_Extension/include/CGAL/Named_function_parameters.h b/STL_Extension/include/CGAL/Named_function_parameters.h index 243ed7b4be5..e48768eaffb 100644 --- a/STL_Extension/include/CGAL/Named_function_parameters.h +++ b/STL_Extension/include/CGAL/Named_function_parameters.h @@ -540,6 +540,6 @@ namespace boost // For disambiguation using SFINAE BOOST_MPL_HAS_XXX_TRAIT_DEF(CGAL_Named_function_parameters_class) template -CGAL_CPP17_INLINE constexpr bool is_named_function_parameter = has_CGAL_Named_function_parameters_class::value; +inline constexpr bool is_named_function_parameter = has_CGAL_Named_function_parameters_class::value; #endif // CGAL_BOOST_FUNCTION_PARAMS_HPP diff --git a/STL_Extension/include/CGAL/type_traits/is_iterator.h b/STL_Extension/include/CGAL/type_traits/is_iterator.h index f8010ab35b3..e1b43ac7a04 100644 --- a/STL_Extension/include/CGAL/type_traits/is_iterator.h +++ b/STL_Extension/include/CGAL/type_traits/is_iterator.h @@ -69,7 +69,7 @@ struct is_iterator { }; template -CGAL_CPP17_INLINE constexpr bool is_iterator_v = is_iterator::value; +inline constexpr bool is_iterator_v = is_iterator::value; template struct is_iterator_type @@ -77,7 +77,7 @@ struct is_iterator_type { }; template -CGAL_CPP17_INLINE constexpr bool is_iterator_type_v = is_iterator_type::value; +inline constexpr bool is_iterator_type_v = is_iterator_type::value; template ::value> @@ -91,7 +91,7 @@ struct is_iterator_to { }; template -CGAL_CPP17_INLINE constexpr bool is_iterator_to_v = is_iterator_to::value; +inline constexpr bool is_iterator_to_v = is_iterator_to::value; } // namespace CGAL diff --git a/Stream_support/include/CGAL/IO/helpers.h b/Stream_support/include/CGAL/IO/helpers.h index 36cd5e2a89c..175f95b189d 100644 --- a/Stream_support/include/CGAL/IO/helpers.h +++ b/Stream_support/include/CGAL/IO/helpers.h @@ -84,7 +84,7 @@ struct is_Range { }; template -CGAL_CPP17_INLINE constexpr bool is_Range_v = is_Range::value; +inline constexpr bool is_Range_v = is_Range::value; // For polygon meshes template @@ -93,7 +93,7 @@ struct is_Point_set_or_Range_or_Iterator { }; template -CGAL_CPP17_INLINE constexpr bool is_Point_set_or_Range_or_Iterator_v = is_Point_set_or_Range_or_Iterator::value; +inline constexpr bool is_Point_set_or_Range_or_Iterator_v = is_Point_set_or_Range_or_Iterator::value; } // end namespace internal } // end namespace IO From e54408370b2583153dc923884a5ec1587bc7898e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Fri, 28 Apr 2023 22:50:53 +0200 Subject: [PATCH 12/22] remove CGAL_CXX17 macro ... and no longer used macros --- .../include/CGAL/Combinatorial_map_storages.h | 10 ---------- .../include/CGAL/Generalized_map_storages.h | 11 ----------- Installation/include/CGAL/config.h | 9 ++------- .../CGAL/CMap_linear_cell_complex_storages.h | 11 ----------- .../CGAL/GMap_linear_cell_complex_storages.h | 12 ------------ Matrix_search/include/CGAL/Cartesian_matrix.h | 4 ---- Mesh_3/include/CGAL/Mesh_3/C3T3_helpers.h | 14 -------------- 7 files changed, 2 insertions(+), 69 deletions(-) diff --git a/Combinatorial_map/include/CGAL/Combinatorial_map_storages.h b/Combinatorial_map/include/CGAL/Combinatorial_map_storages.h index 3754a4439d4..7c505ea5165 100644 --- a/Combinatorial_map/include/CGAL/Combinatorial_map_storages.h +++ b/Combinatorial_map/include/CGAL/Combinatorial_map_storages.h @@ -467,16 +467,6 @@ namespace CGAL { typename Helper::Attribute_containers mattribute_containers; }; -#ifndef CGAL_CXX17 - template - constexpr typename Combinatorial_map_storage_1::Null_descriptor_type - Combinatorial_map_storage_1::null_descriptor; - - template - constexpr typename Combinatorial_map_storage_1::Null_descriptor_type - Combinatorial_map_storage_1::null_handle; -#endif - } // namespace CGAL #if defined(BOOST_GCC) diff --git a/Generalized_map/include/CGAL/Generalized_map_storages.h b/Generalized_map/include/CGAL/Generalized_map_storages.h index d14cc8ea17c..4f40c0a922c 100644 --- a/Generalized_map/include/CGAL/Generalized_map_storages.h +++ b/Generalized_map/include/CGAL/Generalized_map_storages.h @@ -457,17 +457,6 @@ namespace CGAL { /// Tuple of attributes containers typename Helper::Attribute_containers mattribute_containers; }; - -#ifndef CGAL_CXX17 - template - constexpr typename Generalized_map_storage_1::Null_descriptor_type - Generalized_map_storage_1::null_descriptor; - - template - constexpr typename Generalized_map_storage_1::Null_descriptor_type - Generalized_map_storage_1::null_handle; -#endif - } // namespace CGAL #if defined(BOOST_GCC) diff --git a/Installation/include/CGAL/config.h b/Installation/include/CGAL/config.h index d48250f1dc1..0286ae133c1 100644 --- a/Installation/include/CGAL/config.h +++ b/Installation/include/CGAL/config.h @@ -36,11 +36,6 @@ # define WIN64 #endif -#ifdef _MSC_VER -#define _SILENCE_CXX17_ALLOCATOR_VOID_DEPRECATION_WARNING 1 -#define _SILENCE_CXX17_OLD_ALLOCATOR_MEMBERS_DEPRECATION_WARNING 1 -#endif - #ifdef CGAL_INCLUDE_WINDOWS_DOT_H // Mimic users including this file which defines min max macros // and other names leading to name clashes @@ -147,8 +142,8 @@ #endif // Same for C++17 -#if __cplusplus >= 201703L || _MSVC_LANG >= 201703L -# define CGAL_CXX17 1 +#if !(__cplusplus >= 201703L || _MSVC_LANG >= 201703L) +#error "CGAL requires C++ 17" #endif // Same for C++20 #if __cplusplus >= 202002L || _MSVC_LANG >= 202002L diff --git a/Linear_cell_complex/include/CGAL/CMap_linear_cell_complex_storages.h b/Linear_cell_complex/include/CGAL/CMap_linear_cell_complex_storages.h index 6e6884ecbcf..1ec9a1d66af 100644 --- a/Linear_cell_complex/include/CGAL/CMap_linear_cell_complex_storages.h +++ b/Linear_cell_complex/include/CGAL/CMap_linear_cell_complex_storages.h @@ -502,17 +502,6 @@ namespace CGAL { typename Helper::Attribute_containers mattribute_containers; }; -#ifndef CGAL_CXX17 - template - constexpr typename CMap_linear_cell_complex_storage_1::Null_descriptor_type - CMap_linear_cell_complex_storage_1::null_descriptor; - - template - constexpr typename CMap_linear_cell_complex_storage_1::Null_descriptor_type - CMap_linear_cell_complex_storage_1::null_handle; -#endif } // namespace CGAL #if defined(BOOST_GCC) diff --git a/Linear_cell_complex/include/CGAL/GMap_linear_cell_complex_storages.h b/Linear_cell_complex/include/CGAL/GMap_linear_cell_complex_storages.h index ca73368b34a..c2331a6acfb 100644 --- a/Linear_cell_complex/include/CGAL/GMap_linear_cell_complex_storages.h +++ b/Linear_cell_complex/include/CGAL/GMap_linear_cell_complex_storages.h @@ -493,18 +493,6 @@ namespace CGAL { typename Helper::Attribute_containers mattribute_containers; }; -#ifndef CGAL_CXX17 - template - constexpr typename GMap_linear_cell_complex_storage_1::Null_descriptor_type - GMap_linear_cell_complex_storage_1::null_descriptor; - - template - constexpr typename GMap_linear_cell_complex_storage_1::Null_descriptor_type - GMap_linear_cell_complex_storage_1::null_handle; -#endif - } // namespace CGAL #if defined(BOOST_GCC) diff --git a/Matrix_search/include/CGAL/Cartesian_matrix.h b/Matrix_search/include/CGAL/Cartesian_matrix.h index 1aa192ab2c8..be3dba778b4 100644 --- a/Matrix_search/include/CGAL/Cartesian_matrix.h +++ b/Matrix_search/include/CGAL/Cartesian_matrix.h @@ -28,11 +28,7 @@ template < class Operation, class Cartesian_matrix { public: -#if CGAL_CXX17 && __has_cpp_attribute(nodiscard) typedef typename std::invoke_result::value_type, typename std::iterator_traits::value_type>::type Value; -#else - typedef typename Operation::result_type Value; -#endif Cartesian_matrix(RandomAccessIC_row r_f, RandomAccessIC_row r_l, diff --git a/Mesh_3/include/CGAL/Mesh_3/C3T3_helpers.h b/Mesh_3/include/CGAL/Mesh_3/C3T3_helpers.h index 8e86644477b..6a812e5581b 100644 --- a/Mesh_3/include/CGAL/Mesh_3/C3T3_helpers.h +++ b/Mesh_3/include/CGAL/Mesh_3/C3T3_helpers.h @@ -1572,17 +1572,10 @@ private: Cell_vector c3t3_cells(const Cell_vector& cells) const { Cell_vector c3t3_cells; -#ifdef CGAL_CXX17 std::remove_copy_if(cells.begin(), cells.end(), std::back_inserter(c3t3_cells), std::not_fn(Is_in_c3t3(c3t3_))); -#else - std::remove_copy_if(cells.begin(), - cells.end(), - std::back_inserter(c3t3_cells), - std::not1(Is_in_c3t3(c3t3_)) ); -#endif return c3t3_cells; } @@ -3665,17 +3658,10 @@ incident_slivers(const Vertex_handle& v, std::vector incident_cells_; tr_.incident_cells(v, std::back_inserter(incident_cells_)); -#ifdef CGAL_CXX17 std::remove_copy_if(incident_cells_.begin(), incident_cells_.end(), out, std::not_fn(Is_sliver(c3t3_, criterion, sliver_bound))); -#else - std::remove_copy_if(incident_cells_.begin(), - incident_cells_.end(), - out, - std::not1(Is_sliver(c3t3_,criterion,sliver_bound))); -#endif return out; } From c8a88b9014607bde800dbbe9fa0e3e92b6003dc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Fri, 28 Apr 2023 22:55:14 +0200 Subject: [PATCH 13/22] remove CGAL_static_assertion* --- .../internal/AABB_ray_intersection.h | 2 +- ...bb_test_is_ray_intersection_geomtraits.cpp | 8 +-- .../Algebraic_foundations/fraction_traits.cpp | 4 +- .../Algebraic_foundations/interoperable.cpp | 2 +- .../include/CGAL/Algebraic_structure_traits.h | 2 +- .../include/CGAL/Coercion_traits.h | 2 +- .../include/CGAL/Scalar_factor_traits.h | 4 +- .../CGAL/Test/_test_algebraic_structure.h | 52 +++++++++---------- .../include/CGAL/Test/_test_coercion_traits.h | 8 +-- .../include/CGAL/Test/_test_fraction_traits.h | 10 ++-- .../include/CGAL/Test/_test_rational_traits.h | 2 +- .../include/CGAL/Test/_test_real_embeddable.h | 16 +++--- .../Algebraic_extension_traits.cpp | 24 ++++----- .../Algebraic_structure_traits.cpp | 10 ++-- .../Algebraic_foundations/Coercion_traits.cpp | 14 ++--- .../Real_embeddable_traits.cpp | 6 +-- .../Scalar_factor_traits.cpp | 14 ++--- .../Algebraic_curve_kernel_2.h | 12 ++--- .../Algebraic_kernel_d/Algebraic_real_d_1.h | 2 +- .../algebraic_curve_kernel_2_tools.h | 6 +-- .../Real_embeddable_traits_extension.cpp | 16 +++--- .../CGAL/_test_algebraic_curve_kernel_2.h | 8 +-- .../include/CGAL/_test_algebraic_kernel_1.h | 10 ++-- .../include/CGAL/_test_algebraic_kernel_2.h | 16 +++--- .../include/CGAL/_test_real_comparable.h | 16 +++--- Alpha_shapes_2/include/CGAL/Alpha_shape_2.h | 6 +-- .../Alpha_shapes_2/internal/Lazy_alpha_nt_2.h | 4 +- Alpha_shapes_3/include/CGAL/Alpha_shape_3.h | 6 +-- .../Alpha_shapes_3/internal/Lazy_alpha_nt_3.h | 4 +- .../CGAL/Alpha_wrap_3/internal/Alpha_wrap_3.h | 2 +- .../internal/Triangle_mesh_oracle.h | 2 +- .../internal/Triangle_soup_oracle.h | 2 +- .../Get_arithmetic_kernel.cpp | 6 +-- .../Arr_bounded_planar_topology_traits_2.h | 8 +-- .../include/CGAL/Arr_dcel_base.h | 2 +- .../include/CGAL/Arr_overlay_2.h | 8 +-- .../CGAL/Arr_rat_arc/Base_rational_arc_ds_1.h | 4 +- .../CGAL/Arr_rat_arc/Rational_arc_d_1.h | 4 +- .../CGAL/Arr_spherical_topology_traits_2.h | 8 +-- .../CGAL/Arr_unb_planar_topology_traits_2.h | 8 +-- .../include/CGAL/Arrangement_on_surface_2.h | 2 +- .../include/CGAL/Arrangement_zone_2.h | 2 +- .../Arrangement_on_surface_2/test_tags.cpp | 16 +++--- .../graph/IO/Generic_facegraph_builder.h | 4 +- BGL/test/BGL/test_Has_member_clear.cpp | 8 +-- BGL/test/BGL/test_Has_member_id.cpp | 18 +++---- .../Gps_agg_meta_traits.h | 8 +-- .../Gps_traits_decorator.h | 8 +-- .../include/CGAL/box_intersection_d.h | 2 +- .../test_Has_member_report.cpp | 6 +-- Circulator/include/CGAL/circulator.h | 14 ++--- .../ETHZ/internal/random-forest/forest.hpp | 2 +- .../Classification/Local_eigen_analysis.h | 6 +-- .../Sum_of_weighted_features_classifier.h | 2 +- .../include/CGAL/Cell_iterators.h | 6 +-- .../include/CGAL/Combinatorial_map.h | 32 ++++++------ .../Combinatorial_map_group_functors.h | 50 +++++++++--------- .../Combinatorial_map_internal_functors.h | 8 +-- .../CGAL/Combinatorial_map_basic_operations.h | 8 +-- .../CGAL/Combinatorial_map_iterators_base.h | 6 +-- .../CGAL/Combinatorial_map_operations.h | 4 +- .../include/CGAL/Combinatorial_map_storages.h | 6 +-- .../Combinatorial_map_storages_with_index.h | 6 +-- Combinatorial_map/include/CGAL/Dart.h | 4 +- .../include/CGAL/Dart_iterators.h | 18 +++---- .../quick_hull_default_traits.cpp | 14 ++--- .../include/CGAL/GMap_cell_iterators.h | 4 +- .../include/CGAL/GMap_dart_iterators.h | 12 ++--- .../include/CGAL/Generalized_map.h | 32 ++++++------ .../internal/Generalized_map_group_functors.h | 28 +++++----- .../CGAL/Generalized_map_iterators_base.h | 2 +- .../include/CGAL/Generalized_map_operations.h | 4 +- .../include/CGAL/Generalized_map_storages.h | 6 +-- .../Generalized_map_storages_with_index.h | 6 +-- .../Surface_mesh_geodesic_distances_3.h | 2 +- .../internal/deprecation_warning.h | 2 +- .../Installation/test_configuration_qt5.cpp | 2 +- .../include/CGAL/Intersection_traits.h | 4 +- .../internal/Bbox_3_Segment_3_do_intersect.h | 2 +- .../Test/_test_bigfloat_interval_traits.h | 2 +- .../include/CGAL/Test/_test_convert_to_bfi.h | 2 +- .../include/CGAL/Test/_test_interval_traits.h | 6 +-- Kernel_23/include/CGAL/Circle_2.h | 2 +- Kernel_23/include/CGAL/Circle_3.h | 2 +- Kernel_23/include/CGAL/Direction_2.h | 2 +- Kernel_23/include/CGAL/Direction_3.h | 2 +- Kernel_23/include/CGAL/Has_conversion.h | 4 +- Kernel_23/include/CGAL/Iso_cuboid_3.h | 2 +- Kernel_23/include/CGAL/Iso_rectangle_2.h | 2 +- Kernel_23/include/CGAL/Line_2.h | 2 +- Kernel_23/include/CGAL/Line_3.h | 2 +- Kernel_23/include/CGAL/Plane_3.h | 2 +- Kernel_23/include/CGAL/Point_2.h | 2 +- Kernel_23/include/CGAL/Point_3.h | 2 +- Kernel_23/include/CGAL/Ray_2.h | 2 +- Kernel_23/include/CGAL/Ray_3.h | 2 +- Kernel_23/include/CGAL/Segment_2.h | 2 +- Kernel_23/include/CGAL/Segment_3.h | 2 +- Kernel_23/include/CGAL/Sphere_3.h | 2 +- Kernel_23/include/CGAL/Tetrahedron_3.h | 2 +- Kernel_23/include/CGAL/Triangle_2.h | 2 +- Kernel_23/include/CGAL/Triangle_3.h | 2 +- Kernel_23/include/CGAL/Vector_2.h | 2 +- Kernel_23/include/CGAL/Vector_3.h | 2 +- Kernel_23/include/CGAL/Weighted_point_2.h | 2 +- Kernel_23/include/CGAL/Weighted_point_3.h | 2 +- .../include/CGAL/_test_cls_point_2.h | 4 +- .../include/CGAL/_test_cls_point_3.h | 4 +- .../CGAL/CMap_linear_cell_complex_storages.h | 6 +-- ..._linear_cell_complex_storages_with_index.h | 6 +-- .../CGAL/GMap_linear_cell_complex_storages.h | 6 +-- ..._linear_cell_complex_storages_with_index.h | 6 +-- .../include/CGAL/Linear_cell_complex_base.h | 2 +- .../CGAL/Linear_cell_complex_constructors.h | 2 +- .../CGAL/Linear_cell_complex_operations.h | 6 +-- .../include/CGAL/Compact_mesh_cell_base_3.h | 2 +- Mesh_3/include/CGAL/Mesh_criteria_3.h | 4 +- Mesh_3/test/Mesh_3/test_meshing_3D_image.cpp | 2 +- .../test_meshing_3D_image_deprecated.cpp | 2 +- .../test_meshing_3D_image_with_features.cpp | 2 +- .../test/Mesh_3/test_meshing_polyhedron.cpp | 2 +- Nef_2/include/CGAL/Nef_2/PM_overlayer.h | 2 +- .../CGAL/NewKernel_d/Kernel_d_interface.h | 4 +- .../include/CGAL/NewKernel_d/Vector/array.h | 2 +- .../CGAL/NewKernel_d/Wrapper/Hyperplane_d.h | 2 +- .../CGAL/NewKernel_d/Wrapper/Point_d.h | 2 +- .../CGAL/NewKernel_d/Wrapper/Ref_count_obj.h | 2 +- .../CGAL/NewKernel_d/Wrapper/Segment_d.h | 2 +- .../CGAL/NewKernel_d/Wrapper/Sphere_d.h | 2 +- .../CGAL/NewKernel_d/Wrapper/Vector_d.h | 2 +- NewKernel_d/test/NewKernel_d/Epick_d.cpp | 10 ++-- Number_types/include/CGAL/Lazy_exact_nt.h | 4 +- Number_types/include/CGAL/Mpzf.h | 6 +-- Number_types/include/CGAL/Root_of_traits.h | 2 +- .../include/CGAL/Test/test_root_of_traits.h | 12 ++--- Number_types/include/CGAL/mpq_class.h | 2 +- Number_types/include/CGAL/mpz_class.h | 2 +- .../CGAL/simplest_rational_in_interval.h | 4 +- Number_types/include/CGAL/to_rational.h | 4 +- .../test/Number_types/Lazy_exact_nt_new.cpp | 10 ++-- .../test/Number_types/Quotient_new.cpp | 6 +-- .../test/Number_types/Sqrt_extension.h | 8 +-- .../include/CGAL/Test/test_root_of_2_traits.h | 6 +-- Number_types/test/Number_types/ioformat.cpp | 4 +- .../Number_types/known_bit_size_integers.cpp | 16 +++--- .../Number_types/test_nt_Coercion_traits.cpp | 14 ++--- .../internal/optimize_2.h | 2 +- .../oriented_bounding_box.h | 4 +- .../compute_registration_transformation.h | 4 +- .../include/CGAL/OpenGR/register_point_sets.h | 4 +- .../include/CGAL/cluster_point_set.h | 2 +- .../include/CGAL/jet_estimate_normals.h | 2 +- .../include/CGAL/jet_smooth_point_set.h | 2 +- .../compute_registration_transformation.h | 6 +-- .../include/CGAL/structure_point_set.h | 2 +- .../CGAL/Polygon_mesh_processing/clip.h | 2 +- .../connected_components.h | 2 +- .../Polygon_mesh_processing/corefinement.h | 4 +- .../CGAL/Polygon_mesh_processing/distance.h | 8 +-- .../CGAL/Polygon_mesh_processing/fair.h | 4 +- .../intersect_triangle_and_segment_3.h | 2 +- .../Corefinement/intersection_nodes.h | 6 +-- .../intersection_of_coplanar_triangles_3.h | 2 +- .../internal/Snapping/snap.h | 2 +- .../internal/Snapping/snap_vertices.h | 6 +-- .../Polygon_mesh_processing/intersection.h | 8 +-- .../CGAL/Polygon_mesh_processing/locate.h | 4 +- .../CGAL/Polygon_mesh_processing/measure.h | 2 +- .../orient_polygon_soup_extension.h | 8 +-- .../polygon_mesh_to_polygon_soup.h | 2 +- .../polygon_soup_to_polygon_mesh.h | 6 +-- .../repair_self_intersections.h | 2 +- .../self_intersections.h | 2 +- .../Polygon_mesh_processing/smooth_shape.h | 4 +- .../Rigid_triangle_mesh_collision_detection.h | 4 +- .../Polyhedral_envelope_filter.h | 2 +- .../test_pmp_locate.cpp | 4 +- Polyhedron/include/CGAL/Polyhedron_3_to_lcc.h | 2 +- Polynomial/include/CGAL/Exponent_vector.h | 2 +- .../Polynomial/Algebraic_structure_traits.h | 2 +- .../include/CGAL/Polynomial/Polynomial_type.h | 2 +- .../include/CGAL/Polynomial/subresultants.h | 2 +- Polynomial/include/CGAL/Polynomial_traits_d.h | 4 +- .../CGAL/Test/_test_polynomial_traits_d.h | 48 ++++++++--------- .../Polynomial/Polynomial_type_generator.cpp | 6 +-- Polynomial/test/Polynomial/test_polynomial.h | 6 +-- .../test_polynomial_Coercion_traits.cpp | 2 +- .../test_polynomial_Get_arithmetic_kernel.cpp | 4 +- Ridges_3/include/CGAL/Ridges.h | 8 +-- Ridges_3/include/CGAL/Umbilics.h | 8 +-- .../include/CGAL/Handle_with_policy.h | 8 +-- .../include/CGAL/Named_function_parameters.h | 6 +-- STL_Extension/include/CGAL/assertions.h | 6 --- STL_Extension/include/CGAL/for_each.h | 4 +- STL_Extension/include/CGAL/iterator.h | 2 +- .../include/CGAL/transforming_pair_iterator.h | 2 +- .../test/STL_Extension/test_Cache.cpp | 12 ++--- .../STL_Extension/test_Compact_container.cpp | 2 +- .../STL_Extension/test_cgal_named_params.cpp | 20 +++---- .../test/STL_Extension/test_is_iterator.cpp | 22 ++++---- .../test/STL_Extension/test_is_streamable.cpp | 16 +++--- .../test/STL_Extension/test_stl_extension.cpp | 18 +++---- .../Weighted_PCA_smoother.h | 2 +- .../Shape_regularization/regularize_planes.h | 2 +- .../include/CGAL/Snap_rounding_kd_2.h | 2 +- Spatial_searching/include/CGAL/Kd_tree.h | 2 +- .../include/CGAL/Hilbert_sort_median_2.h | 2 +- .../include/CGAL/Hilbert_sort_median_3.h | 2 +- .../test/Stream_support/test_ioformat.cpp | 4 +- .../ARAP_parameterizer_3.h | 2 +- .../Fixed_border_parameterizer_3.h | 2 +- .../Orbifold_Tutte_parameterizer_3.h | 2 +- .../Bounded_distance_placement.h | 2 +- .../Edge_collapse/FastEnvelope_filter.h | 2 +- .../CGAL/Surface_mesher/Combining_oracle.h | 2 +- .../CGAL/No_intersection_surface_sweep_2.h | 2 +- .../CGAL/Triangulation_data_structure_3.h | 2 +- .../include/CGAL/Triangulation_2_to_lcc.h | 2 +- .../include/CGAL/Triangulation_3_to_lcc.h | 2 +- .../CGAL/Delaunay_triangulation_on_sphere_2.h | 4 +- .../internal/arc_on_sphere_2_subsampling.h | 2 +- 221 files changed, 658 insertions(+), 664 deletions(-) diff --git a/AABB_tree/include/CGAL/AABB_tree/internal/AABB_ray_intersection.h b/AABB_tree/include/CGAL/AABB_tree/internal/AABB_ray_intersection.h index e738302d533..ff091ce6c24 100644 --- a/AABB_tree/include/CGAL/AABB_tree/internal/AABB_ray_intersection.h +++ b/AABB_tree/include/CGAL/AABB_tree/internal/AABB_ray_intersection.h @@ -201,7 +201,7 @@ template boost::optional< typename AABB_tree::template Intersection_and_primitive_id::Type > AABB_tree::first_intersection(const Ray& query, const SkipFunctor& skip) const { - CGAL_static_assertion_msg((std::is_same::value), + static_assert((std::is_same::value), "Ray and Ray_3 must be the same type"); switch(size()) // copy-paste from AABB_tree::traversal diff --git a/AABB_tree/test/AABB_tree/aabb_test_is_ray_intersection_geomtraits.cpp b/AABB_tree/test/AABB_tree/aabb_test_is_ray_intersection_geomtraits.cpp index c7198fe98e0..35612dc8ded 100644 --- a/AABB_tree/test/AABB_tree/aabb_test_is_ray_intersection_geomtraits.cpp +++ b/AABB_tree/test/AABB_tree/aabb_test_is_ray_intersection_geomtraits.cpp @@ -26,16 +26,16 @@ int main() { using namespace CGAL::internal::AABB_tree; - CGAL_static_assertion_msg( + static_assert( (Is_ray_intersection_geomtraits::value), "CGAL::Epeck should be a RayIntersectionGeomTraits"); - CGAL_static_assertion_msg( + static_assert( (Is_ray_intersection_geomtraits< CGAL::Simple_cartesian >::value), "CGAL::Epeck should be a RayIntersectionGeomTraits"); - CGAL_static_assertion_msg( + static_assert( (!Is_ray_intersection_geomtraits::value), "Pure AABBGeomTraits shouldn't be a RayIntersectionGeomTraits"); - CGAL_static_assertion_msg( + static_assert( (!Is_ray_intersection_geomtraits::value), "The empty struct shouldn't be a RayIntersectionGeomTraits"); diff --git a/Algebraic_foundations/examples/Algebraic_foundations/fraction_traits.cpp b/Algebraic_foundations/examples/Algebraic_foundations/fraction_traits.cpp index 1bd5f4bd02a..42c1e8d9288 100644 --- a/Algebraic_foundations/examples/Algebraic_foundations/fraction_traits.cpp +++ b/Algebraic_foundations/examples/Algebraic_foundations/fraction_traits.cpp @@ -9,8 +9,8 @@ int main(){ typedef FT::Numerator_type Numerator_type; typedef FT::Denominator_type Denominator_type; - CGAL_static_assertion((std::is_same::value)); - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); + static_assert((std::is_same::value)); Numerator_type numerator; Denominator_type denominator; diff --git a/Algebraic_foundations/examples/Algebraic_foundations/interoperable.cpp b/Algebraic_foundations/examples/Algebraic_foundations/interoperable.cpp index abf8265a837..0963f5f9d36 100644 --- a/Algebraic_foundations/examples/Algebraic_foundations/interoperable.cpp +++ b/Algebraic_foundations/examples/Algebraic_foundations/interoperable.cpp @@ -9,7 +9,7 @@ binary_func(const A& a , const B& b){ typedef CGAL::Coercion_traits CT; // check for explicit interoperability - CGAL_static_assertion((CT::Are_explicit_interoperable::value)); + static_assert((CT::Are_explicit_interoperable::value)); // CT::Cast is used to to convert both types into the coercion type typename CT::Cast cast; diff --git a/Algebraic_foundations/include/CGAL/Algebraic_structure_traits.h b/Algebraic_foundations/include/CGAL/Algebraic_structure_traits.h index cdfca730976..a632e12a197 100644 --- a/Algebraic_foundations/include/CGAL/Algebraic_structure_traits.h +++ b/Algebraic_foundations/include/CGAL/Algebraic_structure_traits.h @@ -353,7 +353,7 @@ class Algebraic_structure_traits_base< Type_, typedef Coercion_traits< NT1, NT2 > CT; typedef typename CT::Type Coercion_type_NT1_NT2; CGAL_USE_TYPE(Coercion_type_NT1_NT2); - CGAL_static_assertion(( + static_assert(( ::std::is_same::value)); typename Coercion_traits< NT1, NT2 >::Cast cast; diff --git a/Algebraic_foundations/include/CGAL/Coercion_traits.h b/Algebraic_foundations/include/CGAL/Coercion_traits.h index 14acb431c7c..09c387b5a09 100644 --- a/Algebraic_foundations/include/CGAL/Coercion_traits.h +++ b/Algebraic_foundations/include/CGAL/Coercion_traits.h @@ -35,7 +35,7 @@ #define CGAL_IMPLICIT_INTEROPERABLE_BINARY_OPERATOR_WITH_RT( NT, Result_type ) \ template < class CT_Type_1, class CT_Type_2 > \ Result_type operator()( const CT_Type_1& x, const CT_Type_2& y ) const { \ - CGAL_static_assertion((::std::is_same< \ + static_assert((::std::is_same< \ typename Coercion_traits< CT_Type_1, CT_Type_2 >::Type, NT \ >::value)); \ \ diff --git a/Algebraic_foundations/include/CGAL/Scalar_factor_traits.h b/Algebraic_foundations/include/CGAL/Scalar_factor_traits.h index db6b3df845d..2d784051197 100644 --- a/Algebraic_foundations/include/CGAL/Scalar_factor_traits.h +++ b/Algebraic_foundations/include/CGAL/Scalar_factor_traits.h @@ -85,13 +85,13 @@ public: // determine extractable scalar factor Scalar operator () (const NT& a) { - CGAL_static_assertion(( ::std::is_same< NT,Scalar >::value)); + static_assert(( ::std::is_same< NT,Scalar >::value)); typedef typename Algebraic_structure_traits::Algebraic_category SAT; return scalar_factor(a, SAT()); } // determine extractable scalar factor Scalar operator () (const NT& a, const Scalar& d) { - CGAL_static_assertion(( ::std::is_same< NT,Scalar >::value)); + static_assert(( ::std::is_same< NT,Scalar >::value)); typedef typename Algebraic_structure_traits::Algebraic_category SAT; return scalar_factor(a,d,SAT()); } diff --git a/Algebraic_foundations/include/CGAL/Test/_test_algebraic_structure.h b/Algebraic_foundations/include/CGAL/Test/_test_algebraic_structure.h index 5a5e23c7d8f..68970af7441 100644 --- a/Algebraic_foundations/include/CGAL/Test/_test_algebraic_structure.h +++ b/Algebraic_foundations/include/CGAL/Test/_test_algebraic_structure.h @@ -44,7 +44,7 @@ template void check_result_type(AdaptableFunctor, ResultType){ typedef typename AdaptableFunctor::result_type result_type; - CGAL_static_assertion((::std::is_same::value)); + static_assert((::std::is_same::value)); CGAL_USE_TYPE(result_type); } // check nothing for CGAL::Null_functor @@ -122,12 +122,12 @@ void test_algebraic_structure_intern( const CGAL::Integral_domain_tag& ) { CGAL_SNAP_AST_FUNCTORS(AST); using CGAL::Null_functor; - CGAL_static_assertion( + static_assert( (!::std::is_same< Integral_division, Null_functor >::value)); - CGAL_static_assertion((!::std::is_same< Divides, Null_functor >::value)); - CGAL_static_assertion((!::std::is_same< Is_zero, Null_functor >::value)); - CGAL_static_assertion((!::std::is_same< Is_one, Null_functor >::value)); - CGAL_static_assertion((!::std::is_same< Square, Null_functor >::value)); + static_assert((!::std::is_same< Divides, Null_functor >::value)); + static_assert((!::std::is_same< Is_zero, Null_functor >::value)); + static_assert((!::std::is_same< Is_one, Null_functor >::value)); + static_assert((!::std::is_same< Square, Null_functor >::value)); // functor const Is_zero is_zero = Is_zero(); @@ -206,7 +206,7 @@ void test_algebraic_structure_intern( CGAL_SNAP_AST_FUNCTORS(AST); using CGAL::Null_functor; - CGAL_static_assertion((!::std::is_same< Gcd, Null_functor>::value)); + static_assert((!::std::is_same< Gcd, Null_functor>::value)); const Gcd gcd = Gcd(); assert( gcd( AS ( 0), AS ( 0)) == unit_normal( AS (0) ) ); @@ -268,9 +268,9 @@ void test_algebraic_structure_intern( const CGAL::Euclidean_ring_tag&) { CGAL_SNAP_AST_FUNCTORS(AST); using CGAL::Null_functor; - CGAL_static_assertion((!::std::is_same< Div, Null_functor>::value)); - CGAL_static_assertion((!::std::is_same< Mod, Null_functor>::value)); - CGAL_static_assertion((!::std::is_same< Div_mod, Null_functor>::value)); + static_assert((!::std::is_same< Div, Null_functor>::value)); + static_assert((!::std::is_same< Mod, Null_functor>::value)); + static_assert((!::std::is_same< Div_mod, Null_functor>::value)); const Div div=Div(); const Mod mod=Mod(); @@ -387,7 +387,7 @@ void test_algebraic_structure_intern( const CGAL::Field_with_sqrt_tag& ) { CGAL_SNAP_AST_FUNCTORS(AST); - CGAL_static_assertion((!::std::is_same< Sqrt, Null_functor>::value)); + static_assert((!::std::is_same< Sqrt, Null_functor>::value)); const Sqrt sqrt =Sqrt(); AS a(4); @@ -613,11 +613,11 @@ class Test_is_square { CGAL_USE_TYPE(First_argument_type); CGAL_USE_TYPE(Second_argument_type); - CGAL_static_assertion( + static_assert( ( ::std::is_same< AS , First_argument_type>::value)); - CGAL_static_assertion( + static_assert( ( ::std::is_same< AS& , Second_argument_type>::value)); - //CGAL_static_assertion(( ::std::is_same< bool , Result_type>::value)); + //static_assert(( ::std::is_same< bool , Result_type>::value)); bool b = Result_type(true); CGAL_USE(b); AS test_number = AS(3)*AS(3); @@ -649,8 +649,8 @@ public: typedef typename Sqrt::result_type Result_type; CGAL_USE_TYPE(Argument_type); CGAL_USE_TYPE(Result_type); - CGAL_static_assertion(( ::std::is_same< AS , Argument_type>::value)); - CGAL_static_assertion(( ::std::is_same< AS , Result_type>::value)); + static_assert(( ::std::is_same< AS , Argument_type>::value)); + static_assert(( ::std::is_same< AS , Result_type>::value)); typedef Algebraic_structure_traits AST; typedef typename AST::Is_exact Is_exact; assert( !Is_exact::value || AS (3) == sqrt( AS (9))); @@ -675,11 +675,11 @@ public: CGAL_USE_TYPE(First_argument_type); CGAL_USE_TYPE(Second_argument_type); CGAL_USE_TYPE(Result_type); - CGAL_static_assertion( + static_assert( ( ::std::is_same::value)); - CGAL_static_assertion( + static_assert( ( ::std::is_same< AS , Second_argument_type>::value)); - CGAL_static_assertion( + static_assert( ( ::std::is_same< AS , Result_type>::value)); AS epsilon(1); assert( test_equality_epsilon( AS (2), @@ -803,7 +803,7 @@ void test_algebraic_structure(){ typedef CGAL::Algebraic_structure_traits< AS > AST; CGAL_SNAP_AST_FUNCTORS(AST); - CGAL_static_assertion((::std::is_same::value)); + static_assert((::std::is_same::value)); typedef typename AST::Boolean Boolean; assert(!Boolean()); @@ -816,14 +816,14 @@ void test_algebraic_structure(){ using CGAL::Integral_domain_without_division_tag; using CGAL::Null_functor; // Test for desired exactness - CGAL_static_assertion( + static_assert( ( ::std::is_same< typename AST::Is_exact, Is_exact >::value)); - CGAL_static_assertion(( ::boost::is_convertible< Tag, + static_assert(( ::boost::is_convertible< Tag, Integral_domain_without_division_tag >::value )); - CGAL_static_assertion(( ::std::is_same< Tag, Algebraic_category>::value)); - CGAL_static_assertion((!::std::is_same< Simplify, Null_functor>::value)); - CGAL_static_assertion((!::std::is_same< Unit_part, Null_functor>::value)); + static_assert(( ::std::is_same< Tag, Algebraic_category>::value)); + static_assert((!::std::is_same< Simplify, Null_functor>::value)); + static_assert((!::std::is_same< Unit_part, Null_functor>::value)); const Simplify simplify=Simplify();; const Unit_part unit_part= Unit_part(); @@ -943,7 +943,7 @@ void test_algebraic_structure( const AS & a, const AS & b, const AS & c) { typedef CGAL::Algebraic_structure_traits AST; typedef typename AST::Is_numerical_sensitive Is_numerical_sensitive; - CGAL_static_assertion( + static_assert( !(::std::is_same::value)); CGAL_USE_TYPE(Is_numerical_sensitive); } diff --git a/Algebraic_foundations/include/CGAL/Test/_test_coercion_traits.h b/Algebraic_foundations/include/CGAL/Test/_test_coercion_traits.h index 0caa6ced04e..fab14e92e98 100644 --- a/Algebraic_foundations/include/CGAL/Test/_test_coercion_traits.h +++ b/Algebraic_foundations/include/CGAL/Test/_test_coercion_traits.h @@ -326,7 +326,7 @@ void test_implicit_interoperable_one_way() { typedef typename CT::Type C; typedef typename CT::Are_implicit_interoperable Are_implicit_interoperable; - CGAL_static_assertion( + static_assert( (::std::is_same::value)); assert((::std::is_same::value)); @@ -346,9 +346,9 @@ void test_explicit_interoperable_one_way(){ typedef typename CT::Cast Cast; typedef typename Cast::result_type result_type; CGAL_USE_TYPE(result_type); - CGAL_static_assertion((::std::is_same::value)); - CGAL_static_assertion((::std::is_same< typename CT::Are_explicit_interoperable,CGAL::Tag_true>::value)); - CGAL_static_assertion((::std::is_same::value)); + static_assert((::std::is_same::value)); + static_assert((::std::is_same< typename CT::Are_explicit_interoperable,CGAL::Tag_true>::value)); + static_assert((::std::is_same::value)); typename CT::Cast cast; A a(3); diff --git a/Algebraic_foundations/include/CGAL/Test/_test_fraction_traits.h b/Algebraic_foundations/include/CGAL/Test/_test_fraction_traits.h index e1aa91eb29d..c12411757b2 100644 --- a/Algebraic_foundations/include/CGAL/Test/_test_fraction_traits.h +++ b/Algebraic_foundations/include/CGAL/Test/_test_fraction_traits.h @@ -37,11 +37,11 @@ void test_fraction_traits(){ typedef typename FT::Compose Compose; CGAL_USE_TYPE(Is_fraction); - CGAL_static_assertion( (::std::is_same::value)); - CGAL_static_assertion( (::std::is_same::value)); - CGAL_static_assertion(!(::std::is_same::value)); - CGAL_static_assertion(!(::std::is_same::value)); - CGAL_static_assertion(!(::std::is_same::value)); + static_assert( (::std::is_same::value)); + static_assert( (::std::is_same::value)); + static_assert(!(::std::is_same::value)); + static_assert(!(::std::is_same::value)); + static_assert(!(::std::is_same::value)); // Decompose diff --git a/Algebraic_foundations/include/CGAL/Test/_test_rational_traits.h b/Algebraic_foundations/include/CGAL/Test/_test_rational_traits.h index 5efda40bc2f..26dce67e619 100644 --- a/Algebraic_foundations/include/CGAL/Test/_test_rational_traits.h +++ b/Algebraic_foundations/include/CGAL/Test/_test_rational_traits.h @@ -29,7 +29,7 @@ void test_rational_traits(){ typedef Rational_traits Rational_traits; typedef typename Rational_traits::RT RT; - CGAL_static_assertion((::std::is_same::value)); + static_assert((::std::is_same::value)); assert( Rational_traits().numerator(x) == RT(7)); assert( Rational_traits().denominator(x) == RT(2)); diff --git a/Algebraic_foundations/include/CGAL/Test/_test_real_embeddable.h b/Algebraic_foundations/include/CGAL/Test/_test_real_embeddable.h index bb67e3f57a5..1f7e818d2d3 100644 --- a/Algebraic_foundations/include/CGAL/Test/_test_real_embeddable.h +++ b/Algebraic_foundations/include/CGAL/Test/_test_real_embeddable.h @@ -48,9 +48,9 @@ namespace CGAL { void operator() (const ToDouble& to_double) { typedef typename ToDouble::argument_type Argument_type; typedef typename ToDouble::result_type Result_type; - CGAL_static_assertion(( ::std::is_same::value)); + static_assert(( ::std::is_same::value)); CGAL_USE_TYPE(Argument_type); - CGAL_static_assertion(( ::std::is_same::value)); + static_assert(( ::std::is_same::value)); CGAL_USE_TYPE(Result_type); assert(42.0 == to_double(Type(42))); } @@ -71,9 +71,9 @@ namespace CGAL { typedef typename To_interval::argument_type Argument_type; typedef typename To_interval::result_type Result_type; typedef std::pair Interval_type; - CGAL_static_assertion(( ::std::is_same::value)); + static_assert(( ::std::is_same::value)); CGAL_USE_TYPE(Argument_type); - CGAL_static_assertion(( ::std::is_same::value)); + static_assert(( ::std::is_same::value)); CGAL_USE_TYPE(Result_type); CGAL_USE_TYPE(Interval_type); // assert(NiX::in(42.0,to_Interval(Type(42)))); @@ -139,7 +139,7 @@ void test_real_embeddable() { CGAL_SNAP_RET_FUNCTORS(RET); typedef typename RET::Is_real_embeddable Is_real_embeddable; using CGAL::Tag_true; - CGAL_static_assertion(( ::std::is_same< Is_real_embeddable, Tag_true>::value)); + static_assert(( ::std::is_same< Is_real_embeddable, Tag_true>::value)); CGAL_USE_TYPE(Is_real_embeddable); typedef typename RET::Boolean Boolean; @@ -246,7 +246,7 @@ void test_not_real_embeddable() { typedef CGAL::Real_embeddable_traits RET; typedef typename RET::Is_real_embeddable Is_real_embeddable; using CGAL::Tag_false; - CGAL_static_assertion(( ::std::is_same< Is_real_embeddable, Tag_false>::value)); + static_assert(( ::std::is_same< Is_real_embeddable, Tag_false>::value)); CGAL_USE_TYPE(Is_real_embeddable); } @@ -254,13 +254,13 @@ void test_not_real_embeddable() { //template //void test_rounded_log2_abs(Type zero, CGAL::Null_functor, CeilLog2Abs) { // typedef CGAL::Null_functor Null_functor; -// CGAL_static_assertion(( ::std::is_same< CeilLog2Abs, Null_functor>::value)); +// static_assert(( ::std::is_same< CeilLog2Abs, Null_functor>::value)); //} // //template //void test_rounded_log2_abs(Type zero, FloorLog2Abs fl_log, CeilLog2Abs cl_log) { // typedef CGAL::Null_functor Null_functor; -// CGAL_static_assertion((!::std::is_same< CeilLog2Abs, Null_functor>::value)); +// static_assert((!::std::is_same< CeilLog2Abs, Null_functor>::value)); // // assert( fl_log(Type( 7)) == 2 ); // assert( cl_log(Type( 7)) == 3 ); diff --git a/Algebraic_foundations/test/Algebraic_foundations/Algebraic_extension_traits.cpp b/Algebraic_foundations/test/Algebraic_foundations/Algebraic_extension_traits.cpp index 87e5235cfe1..03ee581bcbf 100644 --- a/Algebraic_foundations/test/Algebraic_foundations/Algebraic_extension_traits.cpp +++ b/Algebraic_foundations/test/Algebraic_foundations/Algebraic_extension_traits.cpp @@ -9,21 +9,21 @@ int main(){ typedef AET::Type Type; CGAL_USE_TYPE(Type); - CGAL_static_assertion((::std::is_same::value)); + static_assert((::std::is_same::value)); typedef AET::Is_extended Is_extended; CGAL_USE_TYPE(Is_extended); - CGAL_static_assertion( + static_assert( (::std::is_same::value)); typedef AET::Normalization_factor Normalization_factor; { typedef Normalization_factor::argument_type argument_type; CGAL_USE_TYPE(argument_type); - CGAL_static_assertion((::std::is_same::value)); + static_assert((::std::is_same::value)); typedef Normalization_factor::result_type result_type; CGAL_USE_TYPE(result_type); - CGAL_static_assertion((::std::is_same::value)); + static_assert((::std::is_same::value)); Normalization_factor nfac; assert(nfac(3)==1); } @@ -31,10 +31,10 @@ int main(){ { typedef DFAI::argument_type argument_type; CGAL_USE_TYPE(argument_type); - CGAL_static_assertion((::std::is_same::value)); + static_assert((::std::is_same::value)); typedef DFAI::result_type result_type; CGAL_USE_TYPE(result_type); - CGAL_static_assertion((::std::is_same::value)); + static_assert((::std::is_same::value)); DFAI dfai; assert(dfai(3)==1); } @@ -45,21 +45,21 @@ int main(){ typedef AET::Type Type; CGAL_USE_TYPE(Type); - CGAL_static_assertion((::std::is_same::value)); + static_assert((::std::is_same::value)); typedef AET::Is_extended Is_extended; CGAL_USE_TYPE(Is_extended); - CGAL_static_assertion( + static_assert( (::std::is_same::value)); typedef AET::Normalization_factor Normalization_factor; { typedef Normalization_factor::argument_type argument_type; CGAL_USE_TYPE(argument_type); - CGAL_static_assertion((::std::is_same::value)); + static_assert((::std::is_same::value)); typedef Normalization_factor::result_type result_type; CGAL_USE_TYPE(result_type); - CGAL_static_assertion((::std::is_same::value)); + static_assert((::std::is_same::value)); Normalization_factor nfac; assert(nfac(EXT(3))==1); assert(nfac(EXT(3,0,5))==1); @@ -69,10 +69,10 @@ int main(){ { typedef DFAI::argument_type argument_type; CGAL_USE_TYPE(argument_type); - CGAL_static_assertion((::std::is_same::value)); + static_assert((::std::is_same::value)); typedef DFAI::result_type result_type; CGAL_USE_TYPE(result_type); - CGAL_static_assertion((::std::is_same::value)); + static_assert((::std::is_same::value)); DFAI dfai; assert(dfai(EXT(3))==1); assert(dfai(EXT(3,0,5))==1); diff --git a/Algebraic_foundations/test/Algebraic_foundations/Algebraic_structure_traits.cpp b/Algebraic_foundations/test/Algebraic_foundations/Algebraic_structure_traits.cpp index bc1e4b85bb0..f8cb5910ce1 100644 --- a/Algebraic_foundations/test/Algebraic_foundations/Algebraic_structure_traits.cpp +++ b/Algebraic_foundations/test/Algebraic_foundations/Algebraic_structure_traits.cpp @@ -7,7 +7,7 @@ { \ typedef AST::NAME NAME; \ CGAL_USE_TYPE(NAME); \ - CGAL_static_assertion( \ + static_assert( \ (::std::is_same::value)); \ } @@ -16,19 +16,19 @@ int main(){ typedef AST::Type Type; CGAL_USE_TYPE(Type); - CGAL_static_assertion((::std::is_same::value)); + static_assert((::std::is_same::value)); typedef AST::Algebraic_category Algebraic_category; CGAL_USE_TYPE(Algebraic_category); - CGAL_static_assertion( + static_assert( (::std::is_same::value)); typedef AST::Is_exact Is_exact; CGAL_USE_TYPE(Is_exact); - CGAL_static_assertion((::std::is_same::value)); + static_assert((::std::is_same::value)); typedef AST::Is_numerical_sensitive Is_sensitive; CGAL_USE_TYPE(Is_sensitive); - CGAL_static_assertion((::std::is_same::value)); + static_assert((::std::is_same::value)); CGAL_IS_AST_NULL_FUNCTOR ( Simplify); CGAL_IS_AST_NULL_FUNCTOR ( Unit_part); diff --git a/Algebraic_foundations/test/Algebraic_foundations/Coercion_traits.cpp b/Algebraic_foundations/test/Algebraic_foundations/Coercion_traits.cpp index 7deecf693cc..7fcb803e94c 100644 --- a/Algebraic_foundations/test/Algebraic_foundations/Coercion_traits.cpp +++ b/Algebraic_foundations/test/Algebraic_foundations/Coercion_traits.cpp @@ -6,22 +6,22 @@ int main(){ { typedef CGAL::Coercion_traits CT; CGAL_USE_TYPE(CT); - CGAL_static_assertion(( std::is_same::value)); - CGAL_static_assertion( + static_assert(( std::is_same::value)); + static_assert( ( std::is_same::value)); - CGAL_static_assertion( + static_assert( ( std::is_same::value)); assert( 5 == CT::Cast()(5)); } { typedef CGAL::Coercion_traits CT; CGAL_USE_TYPE(CT); -// CGAL_static_assertion(( std::is_same::value)); - CGAL_static_assertion( +// static_assert(( std::is_same::value)); + static_assert( ( std::is_same::value)); - CGAL_static_assertion( + static_assert( ( std::is_same::value)); - CGAL_static_assertion( + static_assert( ( std::is_same::value)); } } diff --git a/Algebraic_foundations/test/Algebraic_foundations/Real_embeddable_traits.cpp b/Algebraic_foundations/test/Algebraic_foundations/Real_embeddable_traits.cpp index f9288c9eefd..3d03fb37e38 100644 --- a/Algebraic_foundations/test/Algebraic_foundations/Real_embeddable_traits.cpp +++ b/Algebraic_foundations/test/Algebraic_foundations/Real_embeddable_traits.cpp @@ -7,7 +7,7 @@ { \ typedef RET::NAME NAME; \ CGAL_USE_TYPE(NAME); \ - CGAL_static_assertion( \ + static_assert( \ (::std::is_same::value)); \ } @@ -16,11 +16,11 @@ int main(){ typedef RET::Type Type; CGAL_USE_TYPE(Type); - CGAL_static_assertion((::std::is_same::value)); + static_assert((::std::is_same::value)); typedef RET::Is_real_embeddable Is_real_embeddable; CGAL_USE_TYPE(Is_real_embeddable); - CGAL_static_assertion((::std::is_same::value)); + static_assert((::std::is_same::value)); CGAL_IS_RET_NULL_FUNCTOR(Abs); CGAL_IS_RET_NULL_FUNCTOR(Sgn); diff --git a/Algebraic_foundations/test/Algebraic_foundations/Scalar_factor_traits.cpp b/Algebraic_foundations/test/Algebraic_foundations/Scalar_factor_traits.cpp index b2b6ffd0bf3..af4cc52c0d6 100644 --- a/Algebraic_foundations/test/Algebraic_foundations/Scalar_factor_traits.cpp +++ b/Algebraic_foundations/test/Algebraic_foundations/Scalar_factor_traits.cpp @@ -7,32 +7,32 @@ int main(){ typedef CGAL::Scalar_factor_traits SFT; CGAL_USE_TYPE(SFT); - CGAL_static_assertion((::std::is_same::value)); - CGAL_static_assertion((::std::is_same::value)); + static_assert((::std::is_same::value)); + static_assert((::std::is_same::value)); typedef SFT::Scalar_factor Scalar_factor; { typedef Scalar_factor::result_type result_type; CGAL_USE_TYPE(result_type); - CGAL_static_assertion((::std::is_same::value)); + static_assert((::std::is_same::value)); typedef Scalar_factor::argument_type argument_type; CGAL_USE_TYPE(argument_type); - CGAL_static_assertion((::std::is_same::value)); + static_assert((::std::is_same::value)); } typedef SFT::Scalar_div Scalar_div; { typedef Scalar_div::result_type result_type; CGAL_USE_TYPE(result_type); - CGAL_static_assertion((::std::is_same::value)); + static_assert((::std::is_same::value)); typedef Scalar_div::first_argument_type first_argument_type; CGAL_USE_TYPE(first_argument_type); - CGAL_static_assertion( + static_assert( (::std::is_same::value)); typedef Scalar_div::second_argument_type second_argument_type; CGAL_USE_TYPE(second_argument_type); - CGAL_static_assertion( + static_assert( (::std::is_same::value)); } diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_curve_kernel_2.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_curve_kernel_2.h index 002e108b0ec..a02edebb8e1 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_curve_kernel_2.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_curve_kernel_2.h @@ -481,16 +481,16 @@ public: Curve_analysis_2 _construct_defining_polynomial_from(Bound b) const { typedef CGAL::Fraction_traits FT; // We rely on the fact that the Bound is a fraction - CGAL_static_assertion((::std::is_same::value)); typedef typename FT::Numerator_type Numerator; typedef typename FT::Denominator_type Denominator; typedef CGAL::Coercion_traits Num_coercion; - CGAL_static_assertion((::std::is_same + static_assert((::std::is_same ::value)); typedef CGAL::Coercion_traits Denom_coercion; - CGAL_static_assertion((::std::is_same + static_assert((::std::is_same ::value)); typename Num_coercion::Cast num_cast; @@ -2541,16 +2541,16 @@ public: Polynomial_1 operator() (const Polynomial_2& f, Bound b) const { typedef CGAL::Fraction_traits FT; // We rely on the fact that the Bound is a fraction - CGAL_static_assertion((::std::is_same::value)); typedef typename FT::Numerator_type Numerator; typedef typename FT::Denominator_type Denominator; typedef CGAL::Coercion_traits Num_coercion; - CGAL_static_assertion((::std::is_same + static_assert((::std::is_same ::value)); typedef CGAL::Coercion_traits Denom_coercion; - CGAL_static_assertion((::std::is_same + static_assert((::std::is_same ::value)); typename Num_coercion::Cast num_cast; diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_real_d_1.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_real_d_1.h index 54fcec0b3f5..2b5a30867ce 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_real_d_1.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_real_d_1.h @@ -71,7 +71,7 @@ class Algebraic_real_d_1 : public ::CGAL::Handle_with_policy< AlgebraicRealRep_d_1, HandlePolicy > { // currently Rational is the only supported Bound type. - CGAL_static_assertion( + static_assert( ( ::std::is_same ::Arithmetic_kernel::Rational>::value)); diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/algebraic_curve_kernel_2_tools.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/algebraic_curve_kernel_2_tools.h index 1609fdbaa6b..4a2b7bd038e 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/algebraic_curve_kernel_2_tools.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/algebraic_curve_kernel_2_tools.h @@ -186,7 +186,7 @@ template::value_type >::value)); @@ -224,12 +224,12 @@ template void cast_back_utcf(const Poly_coer_1& p,Polynomial_1& q) { // We can assume that both template arguments are polynomial types typedef CGAL::Fraction_traits FT; - CGAL_static_assertion((::std::is_same::value)); typedef typename FT::Numerator_type Numerator; typedef typename FT::Denominator_type Denominator; typedef CGAL::Coercion_traits Num_coercion; - CGAL_static_assertion((::std::is_same + static_assert((::std::is_same ::value)); Numerator p_num; diff --git a/Algebraic_kernel_d/test/Algebraic_kernel_d/Real_embeddable_traits_extension.cpp b/Algebraic_kernel_d/test/Algebraic_kernel_d/Real_embeddable_traits_extension.cpp index 2e06d3b6aec..c56969868c1 100644 --- a/Algebraic_kernel_d/test/Algebraic_kernel_d/Real_embeddable_traits_extension.cpp +++ b/Algebraic_kernel_d/test/Algebraic_kernel_d/Real_embeddable_traits_extension.cpp @@ -47,8 +47,8 @@ void test_real_embeddable_extension(const NT_&){ typedef typename Floor::result_type Result_type; CGAL_USE_TYPE(Argument_type); CGAL_USE_TYPE(Result_type); - CGAL_static_assertion(( ::std::is_same::value)); - CGAL_static_assertion(( ::std::is_same::value)); + static_assert(( ::std::is_same::value)); + static_assert(( ::std::is_same::value)); assert(Integer(42) == floor(NT(42))); assert(Integer(-42) == floor(NT(-42))); } @@ -59,8 +59,8 @@ void test_real_embeddable_extension(const NT_&){ typedef typename Floor_log2_abs::result_type Result_type; CGAL_USE_TYPE(Argument_type); CGAL_USE_TYPE(Result_type); - CGAL_static_assertion(( ::std::is_same::value)); - CGAL_static_assertion(( ::std::is_same::value)); + static_assert(( ::std::is_same::value)); + static_assert(( ::std::is_same::value)); assert(long(0) == floor_log2_abs(NT(1))); assert(long(0) == floor_log2_abs(NT(-1))); @@ -86,8 +86,8 @@ void test_real_embeddable_extension(const NT_&){ typedef typename Ceil::result_type Result_type; CGAL_USE_TYPE(Argument_type); CGAL_USE_TYPE(Result_type); - CGAL_static_assertion(( ::std::is_same::value)); - CGAL_static_assertion(( ::std::is_same::value)); + static_assert(( ::std::is_same::value)); + static_assert(( ::std::is_same::value)); assert(Integer(42) == ceil(NT(42))); assert(Integer(-42) == ceil(NT(-42))); } @@ -98,8 +98,8 @@ void test_real_embeddable_extension(const NT_&){ typedef typename Ceil_log2_abs::result_type Result_type; CGAL_USE_TYPE(Argument_type); CGAL_USE_TYPE(Result_type); - CGAL_static_assertion(( ::std::is_same::value)); - CGAL_static_assertion(( ::std::is_same::value)); + static_assert(( ::std::is_same::value)); + static_assert(( ::std::is_same::value)); assert(long(0) == ceil_log2_abs(NT(1))); assert(long(0) == ceil_log2_abs(NT(-1))); diff --git a/Algebraic_kernel_d/test/Algebraic_kernel_d/include/CGAL/_test_algebraic_curve_kernel_2.h b/Algebraic_kernel_d/test/Algebraic_kernel_d/include/CGAL/_test_algebraic_curve_kernel_2.h index 01a27244d74..e110e2b7c95 100644 --- a/Algebraic_kernel_d/test/Algebraic_kernel_d/include/CGAL/_test_algebraic_curve_kernel_2.h +++ b/Algebraic_kernel_d/test/Algebraic_kernel_d/include/CGAL/_test_algebraic_curve_kernel_2.h @@ -62,18 +62,18 @@ void test_algebraic_curve_kernel_2() { typedef AlgebraicCurveKernel_2 AK_2; - /* CGAL_static_assertion( (::std::is_same< + /* static_assert( (::std::is_same< Algebraic_real_1, typename AK::Algebraic_real_1 >::value) ); - CGAL_static_assertion((::std::is_same< + static_assert((::std::is_same< Isolator, typename AK::Isolator >::value) ); - CGAL_static_assertion((::std::is_same< + static_assert((::std::is_same< Coefficient, typename AK::Coefficient >::value)); - CGAL_static_assertion((::std::is_same< + static_assert((::std::is_same< Polynomial_1, typename AK::Polynomial_1 >::value));*/ diff --git a/Algebraic_kernel_d/test/Algebraic_kernel_d/include/CGAL/_test_algebraic_kernel_1.h b/Algebraic_kernel_d/test/Algebraic_kernel_d/include/CGAL/_test_algebraic_kernel_1.h index 20ecd337223..7d12134feff 100644 --- a/Algebraic_kernel_d/test/Algebraic_kernel_d/include/CGAL/_test_algebraic_kernel_1.h +++ b/Algebraic_kernel_d/test/Algebraic_kernel_d/include/CGAL/_test_algebraic_kernel_1.h @@ -109,8 +109,8 @@ void test_algebraic_kernel_1(const AlgebraicKernel_d_1& ak_1){ typedef typename Name::result_type RT_; \ CGAL_USE_TYPE(AT_); \ CGAL_USE_TYPE(RT_); \ - {CGAL_static_assertion(( ::std::is_same::value));} \ - {CGAL_static_assertion(( ::std::is_same::value));} \ + {static_assert(( ::std::is_same::value));} \ + {static_assert(( ::std::is_same::value));} \ } #define CGAL_CHECK_BFUNCTION(Name,AT1,AT2,RT) \ { \ @@ -120,9 +120,9 @@ void test_algebraic_kernel_1(const AlgebraicKernel_d_1& ak_1){ CGAL_USE_TYPE(AT1_); \ CGAL_USE_TYPE(AT2_); \ CGAL_USE_TYPE(RT_); \ - {CGAL_static_assertion(( ::std::is_same::value));} \ - {CGAL_static_assertion(( ::std::is_same::value));} \ - {CGAL_static_assertion(( ::std::is_same::value));} \ + {static_assert(( ::std::is_same::value));} \ + {static_assert(( ::std::is_same::value));} \ + {static_assert(( ::std::is_same::value));} \ } // TODO: missing check for Construct_algebraic_real_1 diff --git a/Algebraic_kernel_d/test/Algebraic_kernel_d/include/CGAL/_test_algebraic_kernel_2.h b/Algebraic_kernel_d/test/Algebraic_kernel_d/include/CGAL/_test_algebraic_kernel_2.h index ff04c8f8c9d..4db859ddb25 100644 --- a/Algebraic_kernel_d/test/Algebraic_kernel_d/include/CGAL/_test_algebraic_kernel_2.h +++ b/Algebraic_kernel_d/test/Algebraic_kernel_d/include/CGAL/_test_algebraic_kernel_2.h @@ -93,8 +93,8 @@ void test_algebraic_kernel_2(const AlgebraicKernel_2& ak_2) { typedef typename Name::result_type RT_; \ CGAL_USE_TYPE(AT_); \ CGAL_USE_TYPE(RT_); \ - {CGAL_static_assertion(( ::std::is_same::value));} \ - {CGAL_static_assertion(( ::std::is_same::value));} \ + {static_assert(( ::std::is_same::value));} \ + {static_assert(( ::std::is_same::value));} \ } #define CGAL_CHECK_BFUNCTION(Name,AT1,AT2,RT) \ { \ @@ -104,13 +104,13 @@ void test_algebraic_kernel_2(const AlgebraicKernel_2& ak_2) { CGAL_USE_TYPE(AT1_); \ CGAL_USE_TYPE(AT2_); \ CGAL_USE_TYPE(RT_); \ - {CGAL_static_assertion(( ::std::is_same::value));} \ - {CGAL_static_assertion(( ::std::is_same::value));} \ - {CGAL_static_assertion(( ::std::is_same::value));} \ + {static_assert(( ::std::is_same::value));} \ + {static_assert(( ::std::is_same::value));} \ + {static_assert(( ::std::is_same::value));} \ } - CGAL_static_assertion(( ::std::is_same + static_assert(( ::std::is_same ::value)); @@ -118,7 +118,7 @@ void test_algebraic_kernel_2(const AlgebraicKernel_2& ak_2) { CGAL_CHECK_UFUNCTION(Make_square_free_2,Polynomial_2,Polynomial_2); // TODO: missing check for Square_free_factorize_2 CGAL_CHECK_BFUNCTION(Is_coprime_2,Polynomial_2,Polynomial_2,bool); - CGAL_static_assertion(( ::std::is_same + static_assert(( ::std::is_same ::value)); CGAL_CHECK_BFUNCTION(Number_of_solutions_2,Polynomial_2,Polynomial_2, size_type); @@ -128,7 +128,7 @@ void test_algebraic_kernel_2(const AlgebraicKernel_2& ak_2) { CGAL_CHECK_UFUNCTION(Compute_polynomial_y_2,Algebraic_real_2,Polynomial_1); CGAL_CHECK_BFUNCTION(Isolate_x_2,Algebraic_real_2,Polynomial_1,BInterval); CGAL_CHECK_BFUNCTION(Isolate_y_2,Algebraic_real_2,Polynomial_1,BInterval); - CGAL_static_assertion(( ::std::is_same + static_assert(( ::std::is_same < BArray,typename Isolate_2::result_type>::value)); CGAL_CHECK_BFUNCTION(Sign_at_2,Polynomial_2,Algebraic_real_2,Sign); CGAL_CHECK_BFUNCTION(Is_zero_at_2,Polynomial_2,Algebraic_real_2,bool); diff --git a/Algebraic_kernel_d/test/Algebraic_kernel_d/include/CGAL/_test_real_comparable.h b/Algebraic_kernel_d/test/Algebraic_kernel_d/include/CGAL/_test_real_comparable.h index a393abe3653..dc9f13e3a03 100644 --- a/Algebraic_kernel_d/test/Algebraic_kernel_d/include/CGAL/_test_real_comparable.h +++ b/Algebraic_kernel_d/test/Algebraic_kernel_d/include/CGAL/_test_real_comparable.h @@ -39,8 +39,8 @@ namespace internal { void operator() (ToDouble to_double) { typedef typename ToDouble::argument_type Argument_type; typedef typename ToDouble::result_type Result_type; - CGAL_static_assertion((::std::is_same::value)); - CGAL_static_assertion((::std::is_same::value)); + static_assert((::std::is_same::value)); + static_assert((::std::is_same::value)); assert(42.0 == to_double(NT(42))); } }; @@ -59,8 +59,8 @@ namespace internal { void operator() (ToInterval to_Interval) { typedef typename ToInterval::argument_type Argument_type; typedef typename ToInterval::result_type Result_type; - CGAL_static_assertion((::std::is_same::value)); - CGAL_static_assertion((::std::is_same< typename Argument_type::Interval, Result_type>::value)); + static_assert((::std::is_same::value)); + static_assert((::std::is_same< typename Argument_type::Interval, Result_type>::value)); // TODO: NiX::in not available!? //assert(NiX::in(42.0,to_Interval(NT(42)))); @@ -99,7 +99,7 @@ void test_real_comparable() { typedef CGAL::Real_embeddable_traits Traits; typedef typename Traits::Is_real_embeddable Is_real_comparable; using ::CGAL::Tag_true; - CGAL_static_assertion((::std::is_same< Is_real_comparable, Tag_true>::value)); + static_assert((::std::is_same< Is_real_comparable, Tag_true>::value)); typename Traits::Compare compare; typename Traits::Sign sign; typename Traits::Abs abs; @@ -168,20 +168,20 @@ void test_not_real_comparable() { typedef CGAL::Real_embeddable_traits Traits; typedef typename Traits::Is_real_embeddable Is_real_comparable; using ::CGAL::Tag_false; - CGAL_static_assertion((::std::is_same< Is_real_comparable, Tag_false>::value)); + static_assert((::std::is_same< Is_real_comparable, Tag_false>::value)); } template void test_rounded_log2_abs(NT zero, ::CGAL::Null_functor, CeilLog2Abs) { typedef ::CGAL::Null_functor Nulltype; - CGAL_static_assertion((::std::is_same< CeilLog2Abs, Nulltype>::value)); + static_assert((::std::is_same< CeilLog2Abs, Nulltype>::value)); } template void test_rounded_log2_abs(NT zero, FloorLog2Abs fl_log, CeilLog2Abs cl_log) { typedef ::CGAL::Null_functor Null_functor; - CGAL_static_assertion((!::std::is_same< CeilLog2Abs, Null_functor>::value)); + static_assert((!::std::is_same< CeilLog2Abs, Null_functor>::value)); assert( fl_log(NT( 7)) == 2 ); assert( cl_log(NT( 7)) == 3 ); diff --git a/Alpha_shapes_2/include/CGAL/Alpha_shape_2.h b/Alpha_shapes_2/include/CGAL/Alpha_shape_2.h index 3c4cb4b7d30..56e52417684 100644 --- a/Alpha_shapes_2/include/CGAL/Alpha_shape_2.h +++ b/Alpha_shapes_2/include/CGAL/Alpha_shape_2.h @@ -61,7 +61,7 @@ public: // because the periodic triangulations' point() function returns a temporary // value while the lazy predicate evaluations that are used when the Exact tag // is set to true rely on a permanent and safe access to the points. - CGAL_static_assertion( + static_assert( (std::is_same::value) || (std::is_same::value)); @@ -76,8 +76,8 @@ public: typedef Type_of_alpha FT; // check that simplices are correctly instantiated - CGAL_static_assertion( (std::is_same::value) ); - CGAL_static_assertion( (std::is_same::value) ); + static_assert( (std::is_same::value) ); + static_assert( (std::is_same::value) ); typedef typename Dt::Point Point; diff --git a/Alpha_shapes_2/include/CGAL/Alpha_shapes_2/internal/Lazy_alpha_nt_2.h b/Alpha_shapes_2/include/CGAL/Alpha_shapes_2/internal/Lazy_alpha_nt_2.h index cc734b7f4b6..22565c21d85 100644 --- a/Alpha_shapes_2/include/CGAL/Alpha_shapes_2/internal/Lazy_alpha_nt_2.h +++ b/Alpha_shapes_2/include/CGAL/Alpha_shapes_2/internal/Lazy_alpha_nt_2.h @@ -148,7 +148,7 @@ class Lazy_alpha_nt_2 Approx_point to_approx(const Input_point& wp) const { // The traits class' Point_2 must be convertible using the Cartesian converter - CGAL_static_assertion((Is_traits_point_convertible_2< + static_assert((Is_traits_point_convertible_2< Input_traits, Kernel_approx, Kernel_exact, Weighted_tag>::value)); To_approx converter; @@ -158,7 +158,7 @@ class Lazy_alpha_nt_2 Exact_point to_exact(const Input_point& wp) const { // The traits class' Point_2 must be convertible using the Cartesian converter - CGAL_static_assertion((Is_traits_point_convertible_2< + static_assert((Is_traits_point_convertible_2< Input_traits, Kernel_approx, Kernel_exact, Weighted_tag>::value)); To_exact converter; diff --git a/Alpha_shapes_3/include/CGAL/Alpha_shape_3.h b/Alpha_shapes_3/include/CGAL/Alpha_shape_3.h index be6849a5886..a7fdc406b04 100644 --- a/Alpha_shapes_3/include/CGAL/Alpha_shape_3.h +++ b/Alpha_shapes_3/include/CGAL/Alpha_shape_3.h @@ -97,7 +97,7 @@ public: // because the periodic triangulations' point() function returns a temporary // value while the lazy predicate evaluations that are used when the Exact tag // is set to true rely on a permanent and safe access to the points. - CGAL_static_assertion( + static_assert( (std::is_same::value) || (std::is_same::value)); @@ -108,8 +108,8 @@ public: typedef typename Gt::FT Coord_type; //checks whether tags are correctly set in Vertex and Cell classes - CGAL_static_assertion( (std::is_same::value) ); - CGAL_static_assertion( (std::is_same::value) ); + static_assert( (std::is_same::value) ); + static_assert( (std::is_same::value) ); typedef typename Dt::Point Point; diff --git a/Alpha_shapes_3/include/CGAL/Alpha_shapes_3/internal/Lazy_alpha_nt_3.h b/Alpha_shapes_3/include/CGAL/Alpha_shapes_3/internal/Lazy_alpha_nt_3.h index cd853624378..f20b050c1a2 100644 --- a/Alpha_shapes_3/include/CGAL/Alpha_shapes_3/internal/Lazy_alpha_nt_3.h +++ b/Alpha_shapes_3/include/CGAL/Alpha_shapes_3/internal/Lazy_alpha_nt_3.h @@ -139,7 +139,7 @@ class Lazy_alpha_nt_3{ Approx_point to_approx(const Input_point& wp) const { // The traits class' Point_3 must be convertible using the Cartesian converter - CGAL_static_assertion((Is_traits_point_convertible_3< + static_assert((Is_traits_point_convertible_3< Input_traits, Kernel_approx, Kernel_exact, Weighted_tag>::value)); To_approx converter; @@ -149,7 +149,7 @@ class Lazy_alpha_nt_3{ Exact_point to_exact(const Input_point& wp) const { // The traits class' Point_3 must be convertible using the Cartesian converter - CGAL_static_assertion((Is_traits_point_convertible_3< + static_assert((Is_traits_point_convertible_3< Input_traits, Kernel_approx, Kernel_exact, Weighted_tag>::value)); To_exact converter; diff --git a/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Alpha_wrap_3.h b/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Alpha_wrap_3.h index 20982e9beaa..0d81f8b8193 100644 --- a/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Alpha_wrap_3.h +++ b/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Alpha_wrap_3.h @@ -193,7 +193,7 @@ public: { // Due to the Steiner point computation being a dichotomy, the algorithm is inherently inexact // and passing exact kernels is explicitly disabled to ensure no misunderstanding. - CGAL_static_assertion((std::is_floating_point::value)); + static_assert((std::is_floating_point::value)); } public: diff --git a/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Triangle_mesh_oracle.h b/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Triangle_mesh_oracle.h index 6d0f65142f6..122599a7d50 100644 --- a/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Triangle_mesh_oracle.h +++ b/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Triangle_mesh_oracle.h @@ -146,7 +146,7 @@ public: VPM vpm = choose_parameter(get_parameter(np, internal_np::vertex_point), get_const_property_map(vertex_point, tmesh)); - CGAL_static_assertion((std::is_same::value_type, Point_3>::value)); + static_assert((std::is_same::value_type, Point_3>::value)); Splitter_base::reserve(num_faces(tmesh)); diff --git a/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Triangle_soup_oracle.h b/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Triangle_soup_oracle.h index 57f936306da..e602b708f95 100644 --- a/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Triangle_soup_oracle.h +++ b/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Triangle_soup_oracle.h @@ -143,7 +143,7 @@ public: #endif PPM pm = choose_parameter(get_parameter(np, internal_np::point_map)); - CGAL_static_assertion((std::is_same::value_type, Point_3>::value)); + static_assert((std::is_same::value_type, Point_3>::value)); Splitter_base::reserve(faces.size()); diff --git a/Arithmetic_kernel/test/Arithmetic_kernel/Get_arithmetic_kernel.cpp b/Arithmetic_kernel/test/Arithmetic_kernel/Get_arithmetic_kernel.cpp index f8b373c9764..2947c3a3761 100644 --- a/Arithmetic_kernel/test/Arithmetic_kernel/Get_arithmetic_kernel.cpp +++ b/Arithmetic_kernel/test/Arithmetic_kernel/Get_arithmetic_kernel.cpp @@ -18,17 +18,17 @@ int main() { { typedef CGAL::Get_arithmetic_kernel::Arithmetic_kernel AK_; CGAL_USE_TYPE(AK_); - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); } { typedef CGAL::Get_arithmetic_kernel::Arithmetic_kernel AK_; CGAL_USE_TYPE(AK_); - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); } { typedef CGAL::Get_arithmetic_kernel::Arithmetic_kernel AK_; CGAL_USE_TYPE(AK_); - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); } return 0; } diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_bounded_planar_topology_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_bounded_planar_topology_traits_2.h index e1582795054..8b4a3e1eca2 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_bounded_planar_topology_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_bounded_planar_topology_traits_2.h @@ -90,10 +90,10 @@ public: typedef typename Gt_adaptor_2::Top_side_category Top_side_category; typedef typename Gt_adaptor_2::Right_side_category Right_side_category; - CGAL_static_assertion((std::is_same< Left_side_category, Arr_oblivious_side_tag >::value)); - CGAL_static_assertion((std::is_same< Bottom_side_category, Arr_oblivious_side_tag >::value)); - CGAL_static_assertion((std::is_same< Top_side_category, Arr_oblivious_side_tag >::value)); - CGAL_static_assertion((std::is_same< Right_side_category, Arr_oblivious_side_tag >::value)); + static_assert((std::is_same< Left_side_category, Arr_oblivious_side_tag >::value)); + static_assert((std::is_same< Bottom_side_category, Arr_oblivious_side_tag >::value)); + static_assert((std::is_same< Top_side_category, Arr_oblivious_side_tag >::value)); + static_assert((std::is_same< Right_side_category, Arr_oblivious_side_tag >::value)); //@} /*! \struct diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_dcel_base.h b/Arrangement_on_surface_2/include/CGAL/Arr_dcel_base.h index 39a618a754d..af2ea182fa7 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_dcel_base.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_dcel_base.h @@ -38,7 +38,7 @@ namespace CGAL { inline void* _clean_pointer(const void* p) { - CGAL_static_assertion(sizeof(void*) == sizeof(size_t)); + static_assert(sizeof(void*) == sizeof(size_t)); const size_t mask = ~1; const size_t val = (reinterpret_cast(p) & mask); diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_overlay_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_overlay_2.h index 83358c14b12..5a32bb997d7 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_overlay_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_overlay_2.h @@ -172,14 +172,14 @@ overlay(const Arrangement_on_surface_2& arr1 typedef typename Agt2::Point_2 A_point; typedef typename Bgt2::Point_2 B_point; typedef typename Rgt2::Point_2 Res_point; - CGAL_static_assertion((boost::is_convertible::value)); - CGAL_static_assertion((boost::is_convertible::value)); + static_assert((boost::is_convertible::value)); + static_assert((boost::is_convertible::value)); typedef typename Agt2::X_monotone_curve_2 A_xcv; typedef typename Bgt2::X_monotone_curve_2 B_xcv; typedef typename Rgt2::X_monotone_curve_2 Res_xcv; - CGAL_static_assertion((boost::is_convertible::value)); - CGAL_static_assertion((boost::is_convertible::value)); + static_assert((boost::is_convertible::value)); + static_assert((boost::is_convertible::value)); typedef Arr_traits_basic_adaptor_2 Gt_adaptor_2; typedef Arr_overlay_traits_2 diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Base_rational_arc_ds_1.h b/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Base_rational_arc_ds_1.h index 7ebec8a5eb6..f72169eea37 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Base_rational_arc_ds_1.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Base_rational_arc_ds_1.h @@ -62,8 +62,8 @@ public: typedef std::vector > Root_multiplicity_vector; - CGAL_static_assertion((std::is_same::value)); - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); public: diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Rational_arc_d_1.h b/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Rational_arc_d_1.h index ef568ab6cad..da8875c4768 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Rational_arc_d_1.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Rational_arc_d_1.h @@ -100,8 +100,8 @@ public: typedef Algebraic_point_2 Point_2; - CGAL_static_assertion((std::is_same::value)); - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); public: diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_spherical_topology_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_spherical_topology_traits_2.h index 9b4ea137450..d7b170e979b 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_spherical_topology_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_spherical_topology_traits_2.h @@ -91,13 +91,13 @@ public: typedef typename Gt_adaptor_2::Top_side_category Top_side_category; typedef typename Gt_adaptor_2::Right_side_category Right_side_category; - CGAL_static_assertion((std::is_same< Left_side_category, Arr_oblivious_side_tag >::value || + static_assert((std::is_same< Left_side_category, Arr_oblivious_side_tag >::value || std::is_same< Left_side_category, Arr_identified_side_tag >::value)); - CGAL_static_assertion((std::is_same< Bottom_side_category, Arr_oblivious_side_tag >::value || + static_assert((std::is_same< Bottom_side_category, Arr_oblivious_side_tag >::value || std::is_same< Bottom_side_category, Arr_contracted_side_tag >::value)); - CGAL_static_assertion((std::is_same< Top_side_category, Arr_oblivious_side_tag >::value || + static_assert((std::is_same< Top_side_category, Arr_oblivious_side_tag >::value || std::is_same< Top_side_category, Arr_contracted_side_tag >::value)); - CGAL_static_assertion((std::is_same< Right_side_category, Arr_oblivious_side_tag >::value || + static_assert((std::is_same< Right_side_category, Arr_oblivious_side_tag >::value || std::is_same< Right_side_category, Arr_identified_side_tag >::value)); //@} diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_unb_planar_topology_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_unb_planar_topology_traits_2.h index 355dd76641e..30181d7270f 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_unb_planar_topology_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_unb_planar_topology_traits_2.h @@ -87,13 +87,13 @@ public: typedef typename Gt_adaptor_2::Top_side_category Top_side_category; typedef typename Gt_adaptor_2::Right_side_category Right_side_category; - CGAL_static_assertion((std::is_same< Left_side_category, Arr_oblivious_side_tag >::value || + static_assert((std::is_same< Left_side_category, Arr_oblivious_side_tag >::value || std::is_same< Left_side_category, Arr_open_side_tag >::value)); - CGAL_static_assertion((std::is_same< Bottom_side_category, Arr_oblivious_side_tag >::value || + static_assert((std::is_same< Bottom_side_category, Arr_oblivious_side_tag >::value || std::is_same< Bottom_side_category, Arr_open_side_tag >::value)); - CGAL_static_assertion((std::is_same< Top_side_category, Arr_oblivious_side_tag>::value || + static_assert((std::is_same< Top_side_category, Arr_oblivious_side_tag>::value || std::is_same< Top_side_category, Arr_open_side_tag >::value)); - CGAL_static_assertion((std::is_same< Right_side_category, Arr_oblivious_side_tag >::value || + static_assert((std::is_same< Right_side_category, Arr_oblivious_side_tag >::value || std::is_same< Right_side_category, Arr_open_side_tag >::value)); //@} diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_on_surface_2.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_on_surface_2.h index 438f46ced1c..cf4ae5eb11b 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arrangement_on_surface_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_on_surface_2.h @@ -77,7 +77,7 @@ public: typedef typename Traits_adaptor_2::Top_side_category Top_side_category; typedef typename Traits_adaptor_2::Right_side_category Right_side_category; - CGAL_static_assertion((Arr_sane_identified_tagging::value)); diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_zone_2.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_zone_2.h index 2e16e30a823..8f0185a5a03 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arrangement_zone_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_zone_2.h @@ -67,7 +67,7 @@ protected: typedef typename Traits_adaptor_2::Top_side_category Top_side_category; typedef typename Traits_adaptor_2::Right_side_category Right_side_category; - CGAL_static_assertion((Arr_sane_identified_tagging::value)); diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_tags.cpp b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_tags.cpp index 84896d26a68..81eae420496 100644 --- a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_tags.cpp +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_tags.cpp @@ -272,38 +272,38 @@ int main () assert(ident12() == false); - CGAL_static_assertion( + static_assert( (std::is_same< CGAL::internal::Arr_complete_left_side_category< Traits5 >::Category, CGAL::Arr_oblivious_side_tag >::value) ); - CGAL_static_assertion( + static_assert( (std::is_same< CGAL::internal::Arr_complete_left_side_category< Traits1 >::Category, CGAL::Arr_open_side_tag >::value) ); - CGAL_static_assertion( + static_assert( (std::is_same::Category, CGAL::Arr_oblivious_side_tag >::value) ); - CGAL_static_assertion( + static_assert( (std::is_same::Category, CGAL::Arr_open_side_tag >::value) ); - CGAL_static_assertion( + static_assert( (std::is_same< CGAL::internal::Arr_complete_top_side_category< Traits5 >::Category, CGAL::Arr_oblivious_side_tag >::value) ); - CGAL_static_assertion( + static_assert( (std::is_same< CGAL::internal::Arr_complete_top_side_category< Traits1 >::Category, CGAL::Arr_open_side_tag >::value) ); - CGAL_static_assertion( + static_assert( (std::is_same< CGAL::internal::Arr_complete_right_side_category< Traits5 >::Category, CGAL::Arr_oblivious_side_tag >::value) ); - CGAL_static_assertion( + static_assert( (std::is_same< CGAL::internal::Arr_complete_right_side_category< Traits1 >::Category, CGAL::Arr_open_side_tag >::value) ); diff --git a/BGL/include/CGAL/boost/graph/IO/Generic_facegraph_builder.h b/BGL/include/CGAL/boost/graph/IO/Generic_facegraph_builder.h index 331f8a0f44b..3ec90082793 100644 --- a/BGL/include/CGAL/boost/graph/IO/Generic_facegraph_builder.h +++ b/BGL/include/CGAL/boost/graph/IO/Generic_facegraph_builder.h @@ -49,9 +49,9 @@ public: typedef typename CGAL::GetVertexPointMap::type VPM; // usually will be true, but might not be the case if using custom type points -// CGAL_static_assertion((std::is_same::value_type>::value)); -// CGAL_static_assertion((std::is_same::type>::value)); typedef typename internal_np::Lookup_named_param_def< diff --git a/BGL/test/BGL/test_Has_member_clear.cpp b/BGL/test/BGL/test_Has_member_clear.cpp index 5a78d9a2d7e..b8adc423eb7 100644 --- a/BGL/test/BGL/test_Has_member_clear.cpp +++ b/BGL/test/BGL/test_Has_member_clear.cpp @@ -19,13 +19,13 @@ struct with_clear_const { int main() { using namespace CGAL::internal; - CGAL_static_assertion(Has_member_clear::value); + static_assert(Has_member_clear::value); - CGAL_static_assertion(!Has_member_clear::value); + static_assert(!Has_member_clear::value); - CGAL_static_assertion(!Has_member_clear::value); + static_assert(!Has_member_clear::value); - CGAL_static_assertion(Has_member_clear::value); + static_assert(Has_member_clear::value); return 0; } diff --git a/BGL/test/BGL/test_Has_member_id.cpp b/BGL/test/BGL/test_Has_member_id.cpp index 6ff478d04c2..7cfec0bf8bd 100644 --- a/BGL/test/BGL/test_Has_member_id.cpp +++ b/BGL/test/BGL/test_Has_member_id.cpp @@ -28,17 +28,17 @@ int main() { using namespace CGAL::internal; - CGAL_static_assertion(!Has_member_id::value); - CGAL_static_assertion(Has_member_id::value); - CGAL_static_assertion(!Has_member_id::value); - CGAL_static_assertion(Has_member_id::value); - CGAL_static_assertion(Has_member_id::value); - CGAL_static_assertion( + static_assert(!Has_member_id::value); + static_assert(Has_member_id::value); + static_assert(!Has_member_id::value); + static_assert(Has_member_id::value); + static_assert(Has_member_id::value); + static_assert( (Has_member_id::Face>::value)); - CGAL_static_assertion(!Has_member_id >::value); - CGAL_static_assertion(Has_member_id >::value); - CGAL_static_assertion(Has_member_id >::value); + static_assert(!Has_member_id >::value); + static_assert(Has_member_id >::value); + static_assert(Has_member_id >::value); return 0; } diff --git a/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_agg_meta_traits.h b/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_agg_meta_traits.h index eeb80bf655d..ef8cc06083f 100644 --- a/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_agg_meta_traits.h +++ b/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_agg_meta_traits.h @@ -123,13 +123,13 @@ public: typedef typename Arr::Right_side_category Right_side_category; // a side is either oblivious or open (unbounded) - CGAL_static_assertion((std::is_same::value || + static_assert((std::is_same::value || std::is_same::value)); - CGAL_static_assertion((std::is_same::value || + static_assert((std::is_same::value || std::is_same::value)); - CGAL_static_assertion((std::is_same::value || + static_assert((std::is_same::value || std::is_same::value)); - CGAL_static_assertion((std::is_same::value || + static_assert((std::is_same::value || std::is_same::value)); typedef typename Arr::Halfedge_handle Halfedge_handle; diff --git a/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_traits_decorator.h b/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_traits_decorator.h index c260e4cf824..9c59b4f3275 100644 --- a/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_traits_decorator.h +++ b/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_traits_decorator.h @@ -53,13 +53,13 @@ public: typedef typename Base::Right_side_category Right_side_category; // a side is either oblivious or open (unbounded) - CGAL_static_assertion((std::is_same< Left_side_category, Arr_oblivious_side_tag >::value || + static_assert((std::is_same< Left_side_category, Arr_oblivious_side_tag >::value || std::is_same< Left_side_category, Arr_open_side_tag >::value)); - CGAL_static_assertion((std::is_same< Bottom_side_category, Arr_oblivious_side_tag >::value || + static_assert((std::is_same< Bottom_side_category, Arr_oblivious_side_tag >::value || std::is_same< Bottom_side_category, Arr_open_side_tag >::value)); - CGAL_static_assertion((std::is_same< Top_side_category, Arr_oblivious_side_tag >::value || + static_assert((std::is_same< Top_side_category, Arr_oblivious_side_tag >::value || std::is_same< Top_side_category, Arr_open_side_tag >::value)); - CGAL_static_assertion((std::is_same< Right_side_category, Arr_oblivious_side_tag >::value || + static_assert((std::is_same< Right_side_category, Arr_oblivious_side_tag >::value || std::is_same< Right_side_category, Arr_open_side_tag >::value)); class Ex_point_2 diff --git a/Box_intersection_d/include/CGAL/box_intersection_d.h b/Box_intersection_d/include/CGAL/box_intersection_d.h index 94752c41462..1ac7a802d7d 100644 --- a/Box_intersection_d/include/CGAL/box_intersection_d.h +++ b/Box_intersection_d/include/CGAL/box_intersection_d.h @@ -63,7 +63,7 @@ void box_intersection_segment_tree_d( const NT sup = Box_intersection_d::box_limits::sup(); #ifndef CGAL_LINKED_WITH_TBB - CGAL_static_assertion_msg (!(boost::is_convertible::value), + static_assert (!(boost::is_convertible::value), "Parallel_tag is enabled but TBB is unavailable."); #else // CGAL_LINKED_WITH_TBB if(boost::is_convertible::value) diff --git a/Box_intersection_d/test/Box_intersection_d/test_Has_member_report.cpp b/Box_intersection_d/test/Box_intersection_d/test_Has_member_report.cpp index 12f64d1bc11..d3d5368f965 100644 --- a/Box_intersection_d/test/Box_intersection_d/test_Has_member_report.cpp +++ b/Box_intersection_d/test/Box_intersection_d/test_Has_member_report.cpp @@ -18,8 +18,8 @@ struct With_report_as_a_template_member_function { int main() { using CGAL::Box_intersection_d::Has_member_report; - CGAL_static_assertion(!Has_member_report::value); - CGAL_static_assertion(Has_member_report::value); - CGAL_static_assertion(Has_member_report::value); + static_assert(!Has_member_report::value); + static_assert(Has_member_report::value); + static_assert(Has_member_report::value); return EXIT_SUCCESS; } diff --git a/Circulator/include/CGAL/circulator.h b/Circulator/include/CGAL/circulator.h index 2b1556218f0..d985eba576c 100644 --- a/Circulator/include/CGAL/circulator.h +++ b/Circulator/include/CGAL/circulator.h @@ -193,45 +193,45 @@ template inline void Assert_circulator( const C &) { typedef typename Circulator_traits::category category; CGAL_USE_TYPE(category); - CGAL_static_assertion((boost::is_convertible::value)); + static_assert((boost::is_convertible::value)); } template inline void Assert_iterator( const I &) { typedef typename Circulator_traits::category category; CGAL_USE_TYPE(category); - CGAL_static_assertion((boost::is_convertible::value)); + static_assert((boost::is_convertible::value)); } template inline void Assert_input_category( const I &/*i*/) { typedef typename std::iterator_traits::iterator_category category; CGAL_USE_TYPE(category); - CGAL_static_assertion((boost::is_convertible::value)); + static_assert((boost::is_convertible::value)); } template inline void Assert_output_category( const I &/*i*/) { typedef typename std::iterator_traits::iterator_category category; CGAL_USE_TYPE(category); - CGAL_static_assertion((boost::is_convertible::value)); + static_assert((boost::is_convertible::value)); } template inline void Assert_forward_category( const IC &/*ic*/) { typedef typename std::iterator_traits::iterator_category category; CGAL_USE_TYPE(category); - CGAL_static_assertion((boost::is_convertible::value)); + static_assert((boost::is_convertible::value)); } template inline void Assert_bidirectional_category( const IC &/*ic*/) { typedef typename std::iterator_traits::iterator_category category; CGAL_USE_TYPE(category); - CGAL_static_assertion((boost::is_convertible::value)); + static_assert((boost::is_convertible::value)); } template inline void Assert_random_access_category( const IC &/*ic*/) { typedef typename std::iterator_traits::iterator_category category; CGAL_USE_TYPE(category); - CGAL_static_assertion((boost::is_convertible::value)); + static_assert((boost::is_convertible::value)); } // The assert at-least-category functions use the following // functions to resolve properly. Note the proper order of the diff --git a/Classification/include/CGAL/Classification/ETHZ/internal/random-forest/forest.hpp b/Classification/include/CGAL/Classification/ETHZ/internal/random-forest/forest.hpp index 4611becf711..4b8bff71481 100644 --- a/Classification/include/CGAL/Classification/ETHZ/internal/random-forest/forest.hpp +++ b/Classification/include/CGAL/Classification/ETHZ/internal/random-forest/forest.hpp @@ -164,7 +164,7 @@ public: f (seed_start, sample_idxes, trees, samples, labels, params.n_in_bag_samples, split_generator); #ifndef CGAL_LINKED_WITH_TBB - CGAL_static_assertion_msg (!(std::is_convertible::value), + static_assert (!(std::is_convertible::value), "Parallel_tag is enabled but TBB is unavailable."); #else if (std::is_convertible::value) diff --git a/Classification/include/CGAL/Classification/Local_eigen_analysis.h b/Classification/include/CGAL/Classification/Local_eigen_analysis.h index 33e1d706599..78606ed2749 100644 --- a/Classification/include/CGAL/Classification/Local_eigen_analysis.h +++ b/Classification/include/CGAL/Classification/Local_eigen_analysis.h @@ -265,7 +265,7 @@ public: out.m_content->mean_range = 0.; #ifndef CGAL_LINKED_WITH_TBB - CGAL_static_assertion_msg (!(std::is_convertible::value), + static_assert (!(std::is_convertible::value), "Parallel_tag is enabled but TBB is unavailable."); #else if (std::is_convertible::value) @@ -353,7 +353,7 @@ public: out.m_content->mean_range = 0.; #ifndef CGAL_LINKED_WITH_TBB - CGAL_static_assertion_msg (!(std::is_convertible::value), + static_assert (!(std::is_convertible::value), "Parallel_tag is enabled but TBB is unavailable."); #else if (std::is_convertible::value) @@ -431,7 +431,7 @@ public: #ifndef CGAL_LINKED_WITH_TBB - CGAL_static_assertion_msg (!(std::is_convertible::value), + static_assert (!(std::is_convertible::value), "Parallel_tag is enabled but TBB is unavailable."); #else if (std::is_convertible::value) diff --git a/Classification/include/CGAL/Classification/Sum_of_weighted_features_classifier.h b/Classification/include/CGAL/Classification/Sum_of_weighted_features_classifier.h index 2d30a534a42..7f16459723a 100644 --- a/Classification/include/CGAL/Classification/Sum_of_weighted_features_classifier.h +++ b/Classification/include/CGAL/Classification/Sum_of_weighted_features_classifier.h @@ -898,7 +898,7 @@ private: std::size_t gt = j; #ifndef CGAL_LINKED_WITH_TBB - CGAL_static_assertion_msg (!(std::is_convertible::value), + static_assert (!(std::is_convertible::value), "Parallel_tag is enabled but TBB is unavailable."); #else if (std::is_convertible::value) diff --git a/Combinatorial_map/include/CGAL/Cell_iterators.h b/Combinatorial_map/include/CGAL/Cell_iterators.h index b54c12bf0c0..9f7095c1900 100644 --- a/Combinatorial_map/include/CGAL/Cell_iterators.h +++ b/Combinatorial_map/include/CGAL/Cell_iterators.h @@ -82,7 +82,7 @@ namespace CGAL { Ite(amap, adart, amap.get_new_mark()), mcell_mark_number(amap.get_new_mark()) { - CGAL_static_assertion( (std::is_same::value) ); CGAL_assertion(amap.is_whole_map_unmarked(mcell_mark_number)); @@ -196,7 +196,7 @@ namespace CGAL { Ite(amap, adart), mmark_number(amap.get_new_mark()) { - CGAL_static_assertion( (std::is_same::value) ); CGAL_assertion(amap.is_whole_map_unmarked(mmark_number)); mark_cell(amap, adart, mmark_number); @@ -303,7 +303,7 @@ namespace CGAL { Base(amap), mmark_number(amap.get_new_mark()) { - CGAL_static_assertion( (std::is_same::value) ); CGAL_assertion(amap.is_whole_map_unmarked(mmark_number)); mark_cell(amap, (*this), mmark_number); diff --git a/Combinatorial_map/include/CGAL/Combinatorial_map.h b/Combinatorial_map/include/CGAL/Combinatorial_map.h index 229a8d1a47d..7266c4cd541 100644 --- a/Combinatorial_map/include/CGAL/Combinatorial_map.h +++ b/Combinatorial_map/include/CGAL/Combinatorial_map.h @@ -185,7 +185,7 @@ namespace CGAL { */ Combinatorial_map_base() { - CGAL_static_assertion_msg(Helper::nb_attribs<=dimension+1, + static_assert(Helper::nb_attribs<=dimension+1, "Too many attributes in the tuple Attributes_enabled"); this->init_storage(); @@ -803,7 +803,7 @@ namespace CGAL { void restricted_set_dart_attribute(Dart_descriptor dh, typename Attribute_descriptor::type ah) { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "set_dart_attribute called but i-attributes are disabled."); if ( this->template attribute(dh)==ah ) return; @@ -826,7 +826,7 @@ namespace CGAL { void set_dart_attribute(Dart_descriptor dh, typename Attribute_descriptor::type ah) { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "set_dart_attribute called but i-attributes are disabled."); if ( this->template attribute(dh)==ah ) return; @@ -1524,7 +1524,7 @@ namespace CGAL { template < class Ite > std::ostream& display_orbits(std::ostream & aos) const { - CGAL_static_assertion( (std::is_same::value) ); unsigned int nb = 0; size_type amark = get_new_mark(); @@ -1584,7 +1584,7 @@ namespace CGAL { template typename Attribute_descriptor::type create_attribute(const Args&... args) { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "create_attribute but i-attributes are disabled"); typename Attribute_descriptor::type res= std::get::value> @@ -1602,7 +1602,7 @@ namespace CGAL { template void erase_attribute(typename Attribute_descriptor::type h) { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "erase_attribute but i-attributes are disabled"); std::get::value> (mattribute_containers).erase(h); @@ -1612,7 +1612,7 @@ namespace CGAL { template bool is_attribute_used(typename Attribute_const_descriptor< i >::type ah) const { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "is_attribute_used but i-attributes are disabled"); return std::get::value> (mattribute_containers).is_used(ah); @@ -1622,7 +1622,7 @@ namespace CGAL { template size_type number_of_attributes() const { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "number_of_attributes but i-attributes are disabled"); return std::get::value> (mattribute_containers).size(); @@ -1636,8 +1636,8 @@ namespace CGAL { void set_attribute(Dart_descriptor dh, typename Attribute_descriptor::type ah) { - CGAL_static_assertion(i<=dimension); - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(i<=dimension); + static_assert(Helper::template Dimension_index::value>=0, "set_attribute but i-attributes are disabled"); for ( typename Dart_of_cell_range::iterator it(*this, dh); it.cont(); ++it) @@ -1651,7 +1651,7 @@ namespace CGAL { template typename Attribute_range::type & attributes() { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "attributes but i-attributes are disabled"); return std::get::value> (mattribute_containers); @@ -1660,7 +1660,7 @@ namespace CGAL { template typename Attribute_const_range::type & attributes() const { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "attributes but i-attributes are disabled"); return std::get::value> (mattribute_containers); @@ -1673,7 +1673,7 @@ namespace CGAL { typename Attribute_type::type&)>& onsplit_functor() { - CGAL_static_assertion_msg + static_assert (Helper::template Dimension_index::value>=0, "onsplit_functor but " "i-attributes are disabled"); @@ -1689,7 +1689,7 @@ namespace CGAL { typename Attribute_type::type&)>& onsplit_functor() const { - CGAL_static_assertion_msg + static_assert (Helper::template Dimension_index::value>=0, "onsplit_functor but " "i-attributes are disabled"); @@ -1705,7 +1705,7 @@ namespace CGAL { typename Attribute_type::type&)>& onmerge_functor() { - CGAL_static_assertion_msg + static_assert (Helper::template Dimension_index::value>=0, "onsplit_functor but " "i-attributes are disabled"); @@ -1720,7 +1720,7 @@ namespace CGAL { typename Attribute_type::type&)>& onmerge_functor() const { - CGAL_static_assertion_msg + static_assert (Helper::template Dimension_index::value>=0, "onsplit_functor but " "i-attributes are disabled"); diff --git a/Combinatorial_map/include/CGAL/Combinatorial_map/internal/Combinatorial_map_group_functors.h b/Combinatorial_map/include/CGAL/Combinatorial_map/internal/Combinatorial_map_group_functors.h index 06f3c4f4dc3..2b55a2c21c9 100644 --- a/Combinatorial_map/include/CGAL/Combinatorial_map/internal/Combinatorial_map_group_functors.h +++ b/Combinatorial_map/include/CGAL/Combinatorial_map/internal/Combinatorial_map_group_functors.h @@ -64,9 +64,9 @@ struct Group_nonvoid_attribute_functor_of_dart_run typename CMap::Dart_descriptor dh1, typename CMap::Dart_descriptor dh2) { - CGAL_static_assertion( 1<=i && i<=CMap::dimension ); - CGAL_static_assertion( i!=j && (i!=1 || j!=0) ); - CGAL_static_assertion_msg(CMap::Helper::template + static_assert( 1<=i && i<=CMap::dimension ); + static_assert( i!=j && (i!=1 || j!=0) ); + static_assert(CMap::Helper::template Dimension_index::value>=0, "Group_attribute_functor_of_dart_run but " "i-attributes are disabled"); @@ -90,8 +90,8 @@ struct Group_nonvoid_attribute_functor_of_dart_run typename CMap::Dart_descriptor dh1, typename CMap::Dart_descriptor dh2) { - CGAL_static_assertion(j!=0 && j!=1); - CGAL_static_assertion_msg(CMap::Helper::template + static_assert(j!=0 && j!=1); + static_assert(CMap::Helper::template Dimension_index<0>::value>=0, "Group_attribute_functor_of_dart_run<0> but " "0-attributes are disabled"); @@ -127,7 +127,7 @@ struct Group_nonvoid_attribute_functor_of_dart_run typename CMap::Dart_descriptor dh1, typename CMap::Dart_descriptor dh2) { - CGAL_static_assertion_msg(CMap::Helper::template + static_assert(CMap::Helper::template Dimension_index<0>::value>=0, "Group_attribute_functor_of_dart_run<0> but " "0-attributes are disabled"); @@ -152,7 +152,7 @@ struct Group_nonvoid_attribute_functor_of_dart_run typename CMap::Dart_descriptor dh1, typename CMap::Dart_descriptor dh2) { - CGAL_static_assertion_msg(CMap::Helper::template + static_assert(CMap::Helper::template Dimension_index<0>::value>=0, "Group_attribute_functor_of_dart_run<0> but " "0-attributes are disabled"); @@ -240,9 +240,9 @@ struct Group_nonvoid_attribute_functor_run typename CMap::Dart_descriptor adart1, typename CMap::Dart_descriptor adart2) { - CGAL_static_assertion( 1<=i && i<=CMap::dimension ); - CGAL_static_assertion( i!=j ); - CGAL_static_assertion_msg + static_assert( 1<=i && i<=CMap::dimension ); + static_assert( i!=j ); + static_assert ( CMap::Helper::template Dimension_index::value>=0, "Group_attribute_functor_run but i-attributes are disabled" ); typename CMap::template Attribute_descriptor::type @@ -279,10 +279,10 @@ struct Group_nonvoid_attribute_functor_run typename CMap::Dart_descriptor dh1, typename CMap::Dart_descriptor dh2 ) { - CGAL_static_assertion_msg + static_assert ( CMap::Helper::template Dimension_index<0>::value>=0, "Group_attribute_functor_run<0> but 0-attributes are disabled" ); - CGAL_static_assertion(j!=0 && j!=1); + static_assert(j!=0 && j!=1); typename CMap::template Attribute_descriptor<0>::type a1=CMap::null_descriptor, a2=CMap::null_descriptor; @@ -340,7 +340,7 @@ struct Group_nonvoid_attribute_functor_run typename CMap::Dart_descriptor dh1, typename CMap::Dart_descriptor dh2 ) { - CGAL_static_assertion_msg + static_assert ( CMap::Helper::template Dimension_index<0>::value>=0, "Group_attribute_functor_run<0> but 0-attributes are disabled" ); typename CMap::Dart_descriptor od=amap.other_extremity(dh2); @@ -377,7 +377,7 @@ struct Group_nonvoid_attribute_functor_run typename CMap::Dart_descriptor dh1, typename CMap::Dart_descriptor dh2 ) { - CGAL_static_assertion_msg + static_assert ( CMap::Helper::template Dimension_index<0>::value>=0, "Group_attribute_functor_run<0> but 0-attributes are disabled" ); typename CMap::Dart_descriptor od =amap.other_extremity(dh1); @@ -474,9 +474,9 @@ struct Degroup_nonvoid_attribute_functor_run typename CMap::Dart_descriptor adart1, typename CMap::Dart_descriptor adart2) { - CGAL_static_assertion( i<=CMap::dimension ); - CGAL_static_assertion( i!=j ); - CGAL_static_assertion_msg + static_assert( i<=CMap::dimension ); + static_assert( i!=j ); + static_assert ( CMap::Helper::template Dimension_index::value>=0, "Degroup_attribute_functor_run but i-attributes are disabled" ); @@ -549,7 +549,7 @@ void test_split_attribute_functor_one_dart unsigned int, typename CMap::Hash_function> & found_attributes, typename CMap::size_type mark ) { - CGAL_static_assertion_msg(CMap::Helper::template + static_assert(CMap::Helper::template Dimension_index::value>=0, "Test_split_attribute_functor_one_dart but " "i-attributes are disabled"); @@ -615,9 +615,9 @@ struct Test_split_nonvoid_attribute_functor_run &modified_darts, typename CMap::size_type mark_modified_darts=CMap::INVALID_MARK) { - CGAL_static_assertion( 1<=i && i<=CMap::dimension ); + static_assert( 1<=i && i<=CMap::dimension ); CGAL_assertion( i!=j ); - CGAL_static_assertion_msg(CMap::Helper::template + static_assert(CMap::Helper::template Dimension_index::value>=0, "Test_split_attribute_functor_run but " "i-attributes are disabled"); @@ -658,9 +658,9 @@ struct Test_split_nonvoid_attribute_functor_run &modified_darts2, typename CMap::size_type mark_modified_darts=CMap::INVALID_MARK) { - CGAL_static_assertion( 1<=i && i<=CMap::dimension ); + static_assert( 1<=i && i<=CMap::dimension ); CGAL_assertion( i!=j ); - CGAL_static_assertion_msg(CMap::Helper::template + static_assert(CMap::Helper::template Dimension_index::value>=0, "Test_split_attribute_functor_run but " "i-attributes are disabled"); @@ -720,7 +720,7 @@ struct Test_split_nonvoid_attribute_functor_run typename CMap::size_type mark_modified_darts=CMap::INVALID_MARK) { CGAL_assertion( j!=0 && j!=1 ); - CGAL_static_assertion_msg(CMap::Helper::template + static_assert(CMap::Helper::template Dimension_index<0>::value>=0, "Test_split_attribute_functor_run<0> but " "0-attributes are disabled"); @@ -772,7 +772,7 @@ struct Test_split_nonvoid_attribute_functor_run typename CMap::size_type mark_modified_darts=CMap::INVALID_MARK) { CGAL_assertion( j!=0 && j!=1 ); - CGAL_static_assertion_msg(CMap::Helper::template + static_assert(CMap::Helper::template Dimension_index<0>::value>=0, "Test_split_attribute_functor_run<0> but " "0-attributes are disabled"); @@ -858,7 +858,7 @@ struct Test_split_nonvoid_attribute_functor_run &modified_darts2, typename CMap::size_type mark_modified_darts=CMap::INVALID_MARK) { - CGAL_static_assertion_msg(CMap::Helper::template + static_assert(CMap::Helper::template Dimension_index<0>::value>=0, "Test_split_attribute_functor_run<0> but " "0-attributes are disabled"); diff --git a/Combinatorial_map/include/CGAL/Combinatorial_map/internal/Combinatorial_map_internal_functors.h b/Combinatorial_map/include/CGAL/Combinatorial_map/internal/Combinatorial_map_internal_functors.h index 3e0b147942c..c76a210ae6f 100644 --- a/Combinatorial_map/include/CGAL/Combinatorial_map/internal/Combinatorial_map_internal_functors.h +++ b/Combinatorial_map/include/CGAL/Combinatorial_map/internal/Combinatorial_map_internal_functors.h @@ -220,7 +220,7 @@ struct Test_is_valid_attribute_functor typename CMap::Dart_const_descriptor adart, std::vector& marks, bool& ares) { - CGAL_static_assertion_msg(CMap::Helper::template + static_assert(CMap::Helper::template Dimension_index::value>=0, "Test_is_valid_attribute_functor but " " i-attributes are disabled"); @@ -304,7 +304,7 @@ struct Correct_invalid_attributes_functor typename CMap::Dart_descriptor adart, std::vector& marks) { - CGAL_static_assertion_msg(CMap::Helper::template + static_assert(CMap::Helper::template Dimension_index::value>=0, "Correct_invalid_attributes_functor but " " i-attributes are disabled"); @@ -362,7 +362,7 @@ struct Cleanup_useless_attributes template static void run(CMap& amap) { - CGAL_static_assertion_msg(CMap::Helper::template + static_assert(CMap::Helper::template Dimension_index::value>=0, "Cleanup_useless_attributes but " " i-attributes are disabled"); @@ -707,7 +707,7 @@ struct Test_is_same_attribute_point_functor typename Map1::Dart_const_descriptor dh1, typename Map2::Dart_const_descriptor dh2) { - CGAL_static_assertion( Withpoint1==true && Withpoint2==true ); + static_assert( Withpoint1==true && Withpoint2==true ); if (m1.template attribute(dh1)==Map1::null_descriptor && m2.template attribute(dh2)==Map2::null_descriptor) return true; diff --git a/Combinatorial_map/include/CGAL/Combinatorial_map_basic_operations.h b/Combinatorial_map/include/CGAL/Combinatorial_map_basic_operations.h index b7974062ae0..56991cc55d1 100644 --- a/Combinatorial_map/include/CGAL/Combinatorial_map_basic_operations.h +++ b/Combinatorial_map/include/CGAL/Combinatorial_map_basic_operations.h @@ -34,7 +34,7 @@ namespace CGAL typename Map::Dart_const_descriptor adart1, typename Map::Dart_const_descriptor adart2) { - CGAL_static_assertion( (std::is_same::value) ); bool found=false; @@ -57,7 +57,7 @@ namespace CGAL typename Map::Dart_const_descriptor adart, typename Map::size_type amark) { - CGAL_static_assertion( (std::is_same::value) ); bool res=true; @@ -98,7 +98,7 @@ namespace CGAL typename Map::Dart_const_descriptor adart, typename Map::size_type amark) { - CGAL_static_assertion( (std::is_same::value) ); CGAL_assertion( (is_whole_orbit_unmarked > @@ -305,7 +305,7 @@ namespace CGAL typename Map::size_type amark, typename Map::size_type amark2=Map::INVALID_MARK) { - CGAL_static_assertion( (std::is_same::value) ); CGAL_assertion( (is_whole_orbit_unmarked > diff --git a/Combinatorial_map/include/CGAL/Combinatorial_map_iterators_base.h b/Combinatorial_map/include/CGAL/Combinatorial_map_iterators_base.h index 0b2c39bc720..25419ab98c0 100644 --- a/Combinatorial_map/include/CGAL/Combinatorial_map_iterators_base.h +++ b/Combinatorial_map/include/CGAL/Combinatorial_map_iterators_base.h @@ -305,7 +305,7 @@ namespace CGAL { typedef typename Map::size_type size_type; - CGAL_static_assertion( (Bi<=Map::dimension && + static_assert( (Bi<=Map::dimension && std::is_same::value) ); public: @@ -493,7 +493,7 @@ namespace CGAL { typedef typename Map::size_type size_type; - CGAL_static_assertion( (std::is_same::value) ); /// Main constructor. @@ -579,7 +579,7 @@ namespace CGAL { /// True iff this iterator is basic typedef Tag_false Basic_iterator; - CGAL_static_assertion( (std::is_same::value) ); /// Main constructor. diff --git a/Combinatorial_map/include/CGAL/Combinatorial_map_operations.h b/Combinatorial_map/include/CGAL/Combinatorial_map_operations.h index 2ba09b32650..6a7a1b6f271 100644 --- a/Combinatorial_map/include/CGAL/Combinatorial_map_operations.h +++ b/Combinatorial_map/include/CGAL/Combinatorial_map_operations.h @@ -77,7 +77,7 @@ namespace CGAL static size_t run(CMap& amap, typename CMap::Dart_descriptor adart, bool update_attributes) { - CGAL_static_assertion ( 1<=i && i(adart)) ); size_t res = 0; @@ -493,7 +493,7 @@ namespace CGAL static size_t run(CMap& amap, typename CMap::Dart_descriptor adart, bool update_attributes) { - CGAL_static_assertion ( 2<=i && i<=CMap::dimension ); + static_assert ( 2<=i && i<=CMap::dimension ); CGAL_assertion( (amap.template is_contractible(adart)) ); size_t res = 0; diff --git a/Combinatorial_map/include/CGAL/Combinatorial_map_storages.h b/Combinatorial_map/include/CGAL/Combinatorial_map_storages.h index 7c505ea5165..8de6b7c1f7f 100644 --- a/Combinatorial_map/include/CGAL/Combinatorial_map_storages.h +++ b/Combinatorial_map/include/CGAL/Combinatorial_map_storages.h @@ -232,7 +232,7 @@ namespace CGAL { template typename Attribute_descriptor::type attribute(Dart_descriptor ADart) { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "attribute called but i-attributes are disabled."); return std::get::value> (ADart->mattribute_descriptors); @@ -241,7 +241,7 @@ namespace CGAL { typename Attribute_const_descriptor::type attribute(Dart_const_descriptor ADart) const { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "attribute called but i-attributes are disabled."); return std::get::value> (ADart->mattribute_descriptors); @@ -252,7 +252,7 @@ namespace CGAL { typename Attribute_descriptor::type copy_attribute (typename Attribute_const_descriptor::type ah) { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "copy_attribute called but i-attributes are disabled."); typename Attribute_descriptor::type res= std::get::value> diff --git a/Combinatorial_map/include/CGAL/Combinatorial_map_storages_with_index.h b/Combinatorial_map/include/CGAL/Combinatorial_map_storages_with_index.h index 584442412c5..f1e3d62cbab 100644 --- a/Combinatorial_map/include/CGAL/Combinatorial_map_storages_with_index.h +++ b/Combinatorial_map/include/CGAL/Combinatorial_map_storages_with_index.h @@ -266,7 +266,7 @@ namespace CGAL { template typename Attribute_descriptor::type attribute(Dart_descriptor ADart) { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "attribute called but i-attributes are disabled."); return std::get::value> (mdarts[ADart].mattribute_descriptors); @@ -275,7 +275,7 @@ namespace CGAL { typename Attribute_const_descriptor::type attribute(Dart_const_descriptor ADart) const { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "attribute called but i-attributes are disabled."); return std::get::value> (mdarts[ADart].mattribute_descriptors); @@ -286,7 +286,7 @@ namespace CGAL { typename Attribute_descriptor::type copy_attribute (typename Attribute_const_descriptor::type ah) { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "copy_attribute called but i-attributes are disabled."); // We need to do a reserve before the emplace in order to avoid a bug of // invalid reference when the container is reallocated. diff --git a/Combinatorial_map/include/CGAL/Dart.h b/Combinatorial_map/include/CGAL/Dart.h index 3308def6103..17ffde4b294 100644 --- a/Combinatorial_map/include/CGAL/Dart.h +++ b/Combinatorial_map/include/CGAL/Dart.h @@ -226,7 +226,7 @@ namespace CGAL { template typename Attribute_descriptor::type attribute() { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "attribute called but i-attributes are disabled."); return std::get::value> (mattribute_descriptors); @@ -234,7 +234,7 @@ namespace CGAL { template typename Attribute_const_descriptor::type attribute() const { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "attribute called but i-attributes are disabled."); return std::get::value> (mattribute_descriptors); diff --git a/Combinatorial_map/include/CGAL/Dart_iterators.h b/Combinatorial_map/include/CGAL/Dart_iterators.h index c73a32b383e..2e552f25950 100644 --- a/Combinatorial_map/include/CGAL/Dart_iterators.h +++ b/Combinatorial_map/include/CGAL/Dart_iterators.h @@ -295,13 +295,13 @@ namespace CGAL { /// Main constructor. CMap_dart_iterator_basic_of_orbit_generic(Map& amap, Dart_descriptor adart): Base(amap, adart) - { CGAL_static_assertion( Bi>=2 && Bi<=Map::dimension ); } + { static_assert( Bi>=2 && Bi<=Map::dimension ); } /// Main constructor. CMap_dart_iterator_basic_of_orbit_generic(Map& amap, Dart_descriptor adart, size_type /*amark*/): Base(amap, adart) - { CGAL_static_assertion( Bi>=2 && Bi<=Map::dimension ); } + { static_assert( Bi>=2 && Bi<=Map::dimension ); } /// Prefix ++ operator. Self& operator++() @@ -346,7 +346,7 @@ namespace CGAL { typedef Tag_false Use_mark; - CGAL_static_assertion( Bi>1 && delta>1 && Bi+delta<=Map::dimension ); + static_assert( Bi>1 && delta>1 && Bi+delta<=Map::dimension ); public: /// Main constructor. @@ -460,7 +460,7 @@ namespace CGAL { typedef Tag_true Use_mark; - CGAL_static_assertion( 2<=Map::dimension ); + static_assert( 2<=Map::dimension ); public: /// Main constructor. @@ -493,7 +493,7 @@ namespace CGAL { typedef Tag_true Use_mark; - CGAL_static_assertion( 2<=Map::dimension ); + static_assert( 2<=Map::dimension ); public: /// Main constructor. @@ -524,7 +524,7 @@ namespace CGAL { typedef Tag_false Use_mark; - CGAL_static_assertion( delta>1 && delta<=Map::dimension ); + static_assert( delta>1 && delta<=Map::dimension ); public: /// Main constructor. @@ -625,7 +625,7 @@ namespace CGAL { typedef Tag_false Use_mark; - CGAL_static_assertion( delta>1 && delta+1<=Map::dimension ); + static_assert( delta>1 && delta+1<=Map::dimension ); public: /// Main constructor. @@ -726,7 +726,7 @@ namespace CGAL { typedef Tag_false Use_mark; - CGAL_static_assertion( Bi>1 && Bi+1<=Map::dimension ); + static_assert( Bi>1 && Bi+1<=Map::dimension ); public: /// Main constructor. @@ -1026,7 +1026,7 @@ namespace CGAL { typedef Tag_true Use_mark; - CGAL_static_assertion( i>1 && i<=Map::dimension+1 ); + static_assert( i>1 && i<=Map::dimension+1 ); public: /// Main constructor. diff --git a/Convex_hull_3/test/Convex_hull_3/quick_hull_default_traits.cpp b/Convex_hull_3/test/Convex_hull_3/quick_hull_default_traits.cpp index d1bca0f468f..cbb64ac931c 100644 --- a/Convex_hull_3/test/Convex_hull_3/quick_hull_default_traits.cpp +++ b/Convex_hull_3/test/Convex_hull_3/quick_hull_default_traits.cpp @@ -23,12 +23,12 @@ using namespace CGAL::Convex_hull_3::internal; int main() { - CGAL_static_assertion( (std::is_same::type>::value) ); - CGAL_static_assertion( (std::is_same::type>::value) ); - CGAL_static_assertion( (std::is_same::type>::value) ); - CGAL_static_assertion( (std::is_same::type>::value) ); - CGAL_static_assertion( (std::is_same::type>::value) ); - CGAL_static_assertion( (std::is_same,Default_traits_for_Chull_3::type>::value) ); - CGAL_static_assertion( (std::is_same, boost::true_type >::Protector,CGAL::Protect_FPU_rounding >::value) ); + static_assert( (std::is_same::type>::value) ); + static_assert( (std::is_same::type>::value) ); + static_assert( (std::is_same::type>::value) ); + static_assert( (std::is_same::type>::value) ); + static_assert( (std::is_same::type>::value) ); + static_assert( (std::is_same,Default_traits_for_Chull_3::type>::value) ); + static_assert( (std::is_same, boost::true_type >::Protector,CGAL::Protect_FPU_rounding >::value) ); return 0; } diff --git a/Generalized_map/include/CGAL/GMap_cell_iterators.h b/Generalized_map/include/CGAL/GMap_cell_iterators.h index a3851f2c297..f708a3a1321 100644 --- a/Generalized_map/include/CGAL/GMap_cell_iterators.h +++ b/Generalized_map/include/CGAL/GMap_cell_iterators.h @@ -70,7 +70,7 @@ namespace CGAL { Base(amap), mmark_number(amap.get_new_mark()) { - CGAL_static_assertion( (std::is_same::value) ); CGAL_assertion(amap.is_whole_map_unmarked(mmark_number)); mark_cell(amap, (*this), mmark_number); @@ -183,7 +183,7 @@ namespace CGAL { Base(amap), mmark_number(amap.get_new_mark()) { - CGAL_static_assertion( (std::is_same::value) ); CGAL_assertion(amap.is_whole_map_unmarked(mmark_number)); mark_cell(amap, (*this), mmark_number); diff --git a/Generalized_map/include/CGAL/GMap_dart_iterators.h b/Generalized_map/include/CGAL/GMap_dart_iterators.h index 600288df844..1545166af3a 100644 --- a/Generalized_map/include/CGAL/GMap_dart_iterators.h +++ b/Generalized_map/include/CGAL/GMap_dart_iterators.h @@ -96,7 +96,7 @@ namespace CGAL { typedef Tag_false Use_mark; ///< True iff this iterator uses mark - CGAL_static_assertion( Ai>=0 && Ai<=Map::dimension ); + static_assert( Ai>=0 && Ai<=Map::dimension ); public: /// Main constructor. @@ -154,7 +154,7 @@ namespace CGAL { typedef Tag_false Use_mark; ///< True iff this iterator uses mark typedef Tag_true Basic_iterator; ///< True iff this iterator is basic - CGAL_static_assertion( (0<=Ai && Ai+delta<=Map::dimension && delta>1) ); + static_assert( (0<=Ai && Ai+delta<=Map::dimension && delta>1) ); public: /// Main constructor. @@ -269,7 +269,7 @@ namespace CGAL { typedef Tag_false Use_mark; ///< True iff this iterator uses mark typedef Tag_true Basic_iterator; ///< True iff this iterator is basic - CGAL_static_assertion(0<=Ai && Ai+1<=Map_::dimension); + static_assert(0<=Ai && Ai+1<=Map_::dimension); public: /// Main constructor. @@ -468,7 +468,7 @@ namespace CGAL { typedef Tag_false Use_mark; ///< True iff this iterator uses mark typedef Tag_true Basic_iterator; ///< True iff this iterator is basic - CGAL_static_assertion( (0<=Ai && delta11) ); @@ -508,7 +508,7 @@ namespace CGAL { typedef Tag_true Basic_iterator; ///< True iff this iterator is basic - CGAL_static_assertion( Ai=0 && i<=Map::dimension+1 ); + static_assert( i>=0 && i<=Map::dimension+1 ); public: /// Main constructor. diff --git a/Generalized_map/include/CGAL/Generalized_map.h b/Generalized_map/include/CGAL/Generalized_map.h index 3e0f077a989..bc9b60c0f90 100644 --- a/Generalized_map/include/CGAL/Generalized_map.h +++ b/Generalized_map/include/CGAL/Generalized_map.h @@ -161,7 +161,7 @@ namespace CGAL { */ Generalized_map_base() { - CGAL_static_assertion_msg(Helper::nb_attribs<=dimension+1, + static_assert(Helper::nb_attribs<=dimension+1, "Too many attributes in the tuple Attributes_enabled"); this->init_storage(); @@ -689,7 +689,7 @@ namespace CGAL { void restricted_set_dart_attribute(Dart_descriptor dh, typename Attribute_descriptor::type ah) { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "set_dart_attribute called but i-attributes are disabled."); if ( this->template attribute(dh)==ah ) return; @@ -712,7 +712,7 @@ namespace CGAL { void set_dart_attribute(Dart_descriptor dh, typename Attribute_descriptor::type ah) { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "set_dart_attribute called but i-attributes are disabled."); if ( this->template attribute(dh)==ah ) return; @@ -1347,7 +1347,7 @@ namespace CGAL { template < class Ite > std::ostream& display_orbits(std::ostream & aos) const { - CGAL_static_assertion( (std::is_same::value) ); unsigned int nb = 0; size_type amark = get_new_mark(); @@ -1409,7 +1409,7 @@ namespace CGAL { template typename Attribute_descriptor::type create_attribute(const Args&... args) { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "create_attribute but i-attributes are disabled"); typename Attribute_descriptor::type res= std::get::value> @@ -1427,7 +1427,7 @@ namespace CGAL { template void erase_attribute(typename Attribute_descriptor::type h) { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "erase_attribute but i-attributes are disabled"); std::get::value> (mattribute_containers).erase(h); @@ -1437,7 +1437,7 @@ namespace CGAL { template bool is_attribute_used(typename Attribute_const_descriptor< i >::type ah) const { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "is_attribute_used but i-attributes are disabled"); return std::get::value> (mattribute_containers).is_used(ah); @@ -1447,7 +1447,7 @@ namespace CGAL { template size_type number_of_attributes() const { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "number_of_attributes but i-attributes are disabled"); return std::get::value> (mattribute_containers).size(); @@ -1461,8 +1461,8 @@ namespace CGAL { void set_attribute(Dart_descriptor dh, typename Attribute_descriptor::type ah) { - CGAL_static_assertion(i<=dimension); - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(i<=dimension); + static_assert(Helper::template Dimension_index::value>=0, "set_attribute but i-attributes are disabled"); for ( typename Dart_of_cell_range::iterator it(*this, dh); it.cont(); ++it) @@ -1476,7 +1476,7 @@ namespace CGAL { template typename Attribute_range::type & attributes() { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "attributes but i-attributes are disabled"); return std::get::value> (mattribute_containers); @@ -1485,7 +1485,7 @@ namespace CGAL { template typename Attribute_const_range::type & attributes() const { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "attributes but i-attributes are disabled"); return std::get::value> (mattribute_containers); @@ -1498,7 +1498,7 @@ namespace CGAL { typename Attribute_type::type&)>& onsplit_functor() { - CGAL_static_assertion_msg + static_assert (Helper::template Dimension_index::value>=0, "onsplit_functor but " "i-attributes are disabled"); @@ -1514,7 +1514,7 @@ namespace CGAL { typename Attribute_type::type&)>& onsplit_functor() const { - CGAL_static_assertion_msg + static_assert (Helper::template Dimension_index::value>=0, "onsplit_functor but " "i-attributes are disabled"); @@ -1530,7 +1530,7 @@ namespace CGAL { typename Attribute_type::type&)>& onmerge_functor() { - CGAL_static_assertion_msg + static_assert (Helper::template Dimension_index::value>=0, "onsplit_functor but " "i-attributes are disabled"); @@ -1545,7 +1545,7 @@ namespace CGAL { typename Attribute_type::type&)>& onmerge_functor() const { - CGAL_static_assertion_msg + static_assert (Helper::template Dimension_index::value>=0, "onsplit_functor but " "i-attributes are disabled"); diff --git a/Generalized_map/include/CGAL/Generalized_map/internal/Generalized_map_group_functors.h b/Generalized_map/include/CGAL/Generalized_map/internal/Generalized_map_group_functors.h index 4a15c8ea733..4b3c17816e4 100644 --- a/Generalized_map/include/CGAL/Generalized_map/internal/Generalized_map_group_functors.h +++ b/Generalized_map/include/CGAL/Generalized_map/internal/Generalized_map_group_functors.h @@ -65,9 +65,9 @@ struct GMap_group_attribute_functor_of_dart_run typename GMap::Dart_descriptor dh1, typename GMap::Dart_descriptor dh2) { - CGAL_static_assertion( i<=GMap::dimension ); - CGAL_static_assertion( i!=j ); - CGAL_static_assertion_msg(GMap::Helper::template + static_assert( i<=GMap::dimension ); + static_assert( i!=j ); + static_assert(GMap::Helper::template Dimension_index::value>=0, "GMap_group_attribute_functor_of_dart_run but " "i-attributes are disabled"); @@ -134,9 +134,9 @@ struct GMap_group_attribute_functor_run typename GMap::Dart_descriptor adart1, typename GMap::Dart_descriptor adart2) { - CGAL_static_assertion( i<=GMap::dimension ); - CGAL_static_assertion( i!=j ); - CGAL_static_assertion_msg + static_assert( i<=GMap::dimension ); + static_assert( i!=j ); + static_assert ( GMap::Helper::template Dimension_index::value>=0, "GMap_group_attribute_functor_run but i-attributes are disabled" ); typename GMap::template Attribute_descriptor::type @@ -212,9 +212,9 @@ struct GMap_degroup_attribute_functor_run typename GMap::Dart_descriptor adart1, typename GMap::Dart_descriptor adart2) { - CGAL_static_assertion( i<=GMap::dimension ); - CGAL_static_assertion( i!=j ); - CGAL_static_assertion_msg + static_assert( i<=GMap::dimension ); + static_assert( i!=j ); + static_assert ( GMap::Helper::template Dimension_index::value>=0, "GMap_degroup_attribute_functor_run but i-attributes are disabled" ); @@ -276,7 +276,7 @@ void GMap_test_split_attribute_functor_one_dart unsigned int, typename GMap::Hash_function> & found_attributes, typename GMap::size_type mark ) { - CGAL_static_assertion_msg(GMap::Helper::template + static_assert(GMap::Helper::template Dimension_index::value>=0, "GMap_test_split_attribute_functor_one_dart but " "i-attributes are disabled"); @@ -340,9 +340,9 @@ struct GMap_test_split_attribute_functor_run &modified_darts, typename GMap::size_type mark_modified_darts=GMap::INVALID_MARK) { - CGAL_static_assertion( i<=GMap::dimension ); + static_assert( i<=GMap::dimension ); CGAL_assertion( i!=j ); - CGAL_static_assertion_msg(GMap::Helper::template + static_assert(GMap::Helper::template Dimension_index::value>=0, "GMap_test_split_attribute_functor_run but " "i-attributes are disabled"); @@ -383,9 +383,9 @@ struct GMap_test_split_attribute_functor_run &modified_darts2, typename GMap::size_type mark_modified_darts=GMap::INVALID_MARK) { - CGAL_static_assertion( i<=GMap::dimension ); + static_assert( i<=GMap::dimension ); CGAL_assertion( i!=j ); - CGAL_static_assertion_msg(GMap::Helper::template + static_assert(GMap::Helper::template Dimension_index::value>=0, "GMap_test_split_attribute_functor_run but " "i-attributes are disabled"); diff --git a/Generalized_map/include/CGAL/Generalized_map_iterators_base.h b/Generalized_map/include/CGAL/Generalized_map_iterators_base.h index 15f5bb484bf..6e9976bca4b 100644 --- a/Generalized_map/include/CGAL/Generalized_map_iterators_base.h +++ b/Generalized_map/include/CGAL/Generalized_map_iterators_base.h @@ -59,7 +59,7 @@ namespace CGAL { typedef Tag_true Use_mark; - CGAL_static_assertion( (Ai<=Map::dimension && + static_assert( (Ai<=Map::dimension && std::is_same::value) ); public: diff --git a/Generalized_map/include/CGAL/Generalized_map_operations.h b/Generalized_map/include/CGAL/Generalized_map_operations.h index 8366f3495df..0ebec7a7c5c 100644 --- a/Generalized_map/include/CGAL/Generalized_map_operations.h +++ b/Generalized_map/include/CGAL/Generalized_map_operations.h @@ -73,7 +73,7 @@ namespace CGAL static size_t run(GMap& amap, typename GMap::Dart_descriptor adart, bool update_attributes) { - CGAL_static_assertion ( i(adart)) ); size_t res = 0; @@ -292,7 +292,7 @@ namespace CGAL static size_t run(GMap& amap, typename GMap::Dart_descriptor adart, bool update_attributes) { - CGAL_static_assertion ( 1<=i && i<=GMap::dimension ); + static_assert ( 1<=i && i<=GMap::dimension ); CGAL_assertion( (amap.template is_contractible(adart)) ); size_t res = 0; diff --git a/Generalized_map/include/CGAL/Generalized_map_storages.h b/Generalized_map/include/CGAL/Generalized_map_storages.h index 4f40c0a922c..469741cbb16 100644 --- a/Generalized_map/include/CGAL/Generalized_map_storages.h +++ b/Generalized_map/include/CGAL/Generalized_map_storages.h @@ -229,7 +229,7 @@ namespace CGAL { template typename Attribute_descriptor::type attribute(Dart_descriptor ADart) { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "attribute called but i-attributes are disabled."); return std::get::value> (ADart->mattribute_descriptors); @@ -238,7 +238,7 @@ namespace CGAL { typename Attribute_const_descriptor::type attribute(Dart_const_descriptor ADart) const { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "attribute called but i-attributes are disabled."); return std::get::value> (ADart->mattribute_descriptors); @@ -249,7 +249,7 @@ namespace CGAL { typename Attribute_descriptor::type copy_attribute (typename Attribute_const_descriptor::type ah) { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "copy_attribute called but i-attributes are disabled."); typename Attribute_descriptor::type res= std::get::value> diff --git a/Generalized_map/include/CGAL/Generalized_map_storages_with_index.h b/Generalized_map/include/CGAL/Generalized_map_storages_with_index.h index 828004b8416..ffd867477f2 100644 --- a/Generalized_map/include/CGAL/Generalized_map_storages_with_index.h +++ b/Generalized_map/include/CGAL/Generalized_map_storages_with_index.h @@ -220,7 +220,7 @@ namespace CGAL { template typename Attribute_descriptor::type attribute(Dart_descriptor ADart) { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "attribute called but i-attributes are disabled."); return std::get::value> (mdarts[ADart].mattribute_descriptors); @@ -229,7 +229,7 @@ namespace CGAL { typename Attribute_const_descriptor::type attribute(Dart_const_descriptor ADart) const { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "attribute called but i-attributes are disabled."); return std::get::value> (mdarts[ADart].mattribute_descriptors); @@ -240,7 +240,7 @@ namespace CGAL { typename Attribute_descriptor::type copy_attribute (typename Attribute_const_descriptor::type ah) { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "copy_attribute called but i-attributes are disabled."); // We need to do a reserve before the emplace in order to avoid a bug of // invalid reference when the container is reallocated. diff --git a/Heat_method_3/include/CGAL/Heat_method_3/Surface_mesh_geodesic_distances_3.h b/Heat_method_3/include/CGAL/Heat_method_3/Surface_mesh_geodesic_distances_3.h index 0dead11c3ca..150efcbf88e 100644 --- a/Heat_method_3/include/CGAL/Heat_method_3/Surface_mesh_geodesic_distances_3.h +++ b/Heat_method_3/include/CGAL/Heat_method_3/Surface_mesh_geodesic_distances_3.h @@ -752,7 +752,7 @@ class Surface_mesh_geodesic_distances_3 > #endif { - CGAL_static_assertion((std::is_same::value) || + static_assert((std::is_same::value) || (std::is_same::value)); // extract real types from Default diff --git a/Installation/include/CGAL/Installation/internal/deprecation_warning.h b/Installation/include/CGAL/Installation/internal/deprecation_warning.h index 0206b562974..6601ff23520 100644 --- a/Installation/include/CGAL/Installation/internal/deprecation_warning.h +++ b/Installation/include/CGAL/Installation/internal/deprecation_warning.h @@ -71,7 +71,7 @@ #endif #if defined(CGAL_NO_DEPRECATED_CODE) // No deprecated code. -CGAL_static_assertion_msg(false, CGAL_INTERNAL_DEPRECATED_MESSAGE); +static_assert(false, CGAL_INTERNAL_DEPRECATED_MESSAGE); #elif !defined(CGAL_NO_DEPRECATION_WARNINGS) // don't trigger on NO_DEPRECATION_WARNINGS # if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__DMC__) # pragma message (CGAL_INTERNAL_DEPRECATED_MESSAGE) diff --git a/Installation/test/Installation/test_configuration_qt5.cpp b/Installation/test/Installation/test_configuration_qt5.cpp index af10e898b98..9a869cc25b6 100644 --- a/Installation/test/Installation/test_configuration_qt5.cpp +++ b/Installation/test/Installation/test_configuration_qt5.cpp @@ -13,7 +13,7 @@ template typename CGAL::Coercion_traits::Type binary_func(const A& a , const B& b){ typedef CGAL::Coercion_traits CT; - CGAL_static_assertion((CT::Are_explicit_interoperable::value)); + static_assert((CT::Are_explicit_interoperable::value)); typename CT::Cast cast; return cast(a)*cast(b); } diff --git a/Intersections_2/include/CGAL/Intersection_traits.h b/Intersections_2/include/CGAL/Intersection_traits.h index 9cc25059be9..3bfb327db9e 100644 --- a/Intersections_2/include/CGAL/Intersection_traits.h +++ b/Intersections_2/include/CGAL/Intersection_traits.h @@ -181,7 +181,7 @@ do_intersect_impl(const A& a, const B& b, Dynamic_dimension_tag) { // inline // typename Intersection_traits< typename Kernel_traits::Kernel, A, B>::result_type >::type // intersection(const A& a, const B& b) { -// CGAL_static_assertion_msg( (std::is_same::value), +// static_assert( (std::is_same::value), // "intersection with objects of different dimensions not supported"); // return internal::intersection_impl(a, b, typename A::Ambient_dimension()); // } @@ -190,7 +190,7 @@ do_intersect_impl(const A& a, const B& b, Dynamic_dimension_tag) { // inline // auto // K::Boolean // do_intersect(const A& a, const B& b) { -// CGAL_static_assertion_msg((std::is_same::value), +// static_assert((std::is_same::value), // "do_intersect with objects of different dimensions not supported"); // return internal::do_intersect_impl(a, b, typename A::Ambient_dimension()); // } diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Segment_3_do_intersect.h b/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Segment_3_do_intersect.h index f7ebc70d25e..183158050e8 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Segment_3_do_intersect.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Segment_3_do_intersect.h @@ -66,7 +66,7 @@ class Do_intersect_bbox_segment_aux_is_greater double dmax; public: - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); Do_intersect_bbox_segment_aux_is_greater() : error(0.), tmax(0.), dmax(0.) {} diff --git a/Interval_support/include/CGAL/Test/_test_bigfloat_interval_traits.h b/Interval_support/include/CGAL/Test/_test_bigfloat_interval_traits.h index 11342ed5963..b82269dbf14 100644 --- a/Interval_support/include/CGAL/Test/_test_bigfloat_interval_traits.h +++ b/Interval_support/include/CGAL/Test/_test_bigfloat_interval_traits.h @@ -41,7 +41,7 @@ void test_bigfloat_interval_traits() { typedef typename BFIT::Is_bigfloat_interval Is_bigfloat_interval; CGAL_USE_TYPE(Is_bigfloat_interval); // using CGAL::Tag_true; - CGAL_static_assertion(( ::std::is_same< Is_bigfloat_interval, CGAL::Tag_true>::value)); + static_assert(( ::std::is_same< Is_bigfloat_interval, CGAL::Tag_true>::value)); const typename BFIT::Construct construct = typename BFIT::Construct(); const typename BFIT::Set_precision set_precision = typename BFIT::Set_precision(); diff --git a/Interval_support/include/CGAL/Test/_test_convert_to_bfi.h b/Interval_support/include/CGAL/Test/_test_convert_to_bfi.h index 34e731dae1a..59addf6a1fe 100644 --- a/Interval_support/include/CGAL/Test/_test_convert_to_bfi.h +++ b/Interval_support/include/CGAL/Test/_test_convert_to_bfi.h @@ -41,7 +41,7 @@ template void test_convert_to_bfi_from(BFI,From){ typedef typename CGAL::Coercion_traits::Type CT_type; CGAL_USE_TYPE(CT_type); - CGAL_static_assertion(( ::std::is_same::value)); + static_assert(( ::std::is_same::value)); assert(CGAL::convert_to_bfi(From(0)) == BFI(0)); assert(CGAL::convert_to_bfi(From(1)) == BFI(1)); assert(CGAL::convert_to_bfi(From(2)) == BFI(2)); diff --git a/Interval_support/include/CGAL/Test/_test_interval_traits.h b/Interval_support/include/CGAL/Test/_test_interval_traits.h index d44384dff79..dffa0a292e9 100644 --- a/Interval_support/include/CGAL/Test/_test_interval_traits.h +++ b/Interval_support/include/CGAL/Test/_test_interval_traits.h @@ -36,7 +36,7 @@ void test_with_empty_interval(CGAL::Tag_false) { typedef CGAL::Interval_traits IT; typedef typename IT::Empty Empty; CGAL_USE_TYPE(Empty); - CGAL_static_assertion( + static_assert( (::std::is_same< Empty, CGAL::Null_functor>::value)); // this part changes in case we allow empty intersection @@ -74,8 +74,8 @@ void test_interval_traits() { typedef typename IT::With_empty_interval With_empty_interval; CGAL_USE_TYPE(Is_interval); using CGAL::Tag_true; - CGAL_static_assertion(( ::std::is_same< Is_interval, Tag_true>::value)); - CGAL_static_assertion(( ::std::is_same< Interval_, Interval>::value)); + static_assert(( ::std::is_same< Is_interval, Tag_true>::value)); + static_assert(( ::std::is_same< Interval_, Interval>::value)); test_with_empty_interval(With_empty_interval()); diff --git a/Kernel_23/include/CGAL/Circle_2.h b/Kernel_23/include/CGAL/Circle_2.h index 921a30d2206..48a4896fe4e 100644 --- a/Kernel_23/include/CGAL/Circle_2.h +++ b/Kernel_23/include/CGAL/Circle_2.h @@ -35,7 +35,7 @@ class Circle_2 : public R_::Kernel_base::Circle_2 typedef typename R_::Aff_transformation_2 Aff_transformation_2; typedef Circle_2 Self; - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); public: diff --git a/Kernel_23/include/CGAL/Circle_3.h b/Kernel_23/include/CGAL/Circle_3.h index 3030977c225..4da79afd351 100644 --- a/Kernel_23/include/CGAL/Circle_3.h +++ b/Kernel_23/include/CGAL/Circle_3.h @@ -43,7 +43,7 @@ template typedef typename R_::Direction_3 Direction_3; typedef Circle_3 Self; - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); public: diff --git a/Kernel_23/include/CGAL/Direction_2.h b/Kernel_23/include/CGAL/Direction_2.h index e3478708354..d3376d74021 100644 --- a/Kernel_23/include/CGAL/Direction_2.h +++ b/Kernel_23/include/CGAL/Direction_2.h @@ -38,7 +38,7 @@ class Direction_2 : public R_::Kernel_base::Direction_2 typedef typename R_::Kernel_base::Direction_2 RDirection_2; typedef Direction_2 Self; - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); public: diff --git a/Kernel_23/include/CGAL/Direction_3.h b/Kernel_23/include/CGAL/Direction_3.h index 6e0eb4930ab..6c0d1359657 100644 --- a/Kernel_23/include/CGAL/Direction_3.h +++ b/Kernel_23/include/CGAL/Direction_3.h @@ -37,7 +37,7 @@ class Direction_3 : public R_::Kernel_base::Direction_3 typedef typename R_::Aff_transformation_3 Aff_transformation_3; typedef Direction_3 Self; - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); public: diff --git a/Kernel_23/include/CGAL/Has_conversion.h b/Kernel_23/include/CGAL/Has_conversion.h index 8e500c916d2..0a042781fac 100644 --- a/Kernel_23/include/CGAL/Has_conversion.h +++ b/Kernel_23/include/CGAL/Has_conversion.h @@ -23,7 +23,7 @@ namespace internal { template struct Converter_selector { - CGAL_static_assertion_msg((std::is_same::value), "Kernels must have the same representation"); @@ -33,7 +33,7 @@ struct Converter_selector template struct Converter_selector { - CGAL_static_assertion_msg((std::is_same::value), "Kernels must have the same representation"); diff --git a/Kernel_23/include/CGAL/Iso_cuboid_3.h b/Kernel_23/include/CGAL/Iso_cuboid_3.h index a78404b8db0..35a157c5e63 100644 --- a/Kernel_23/include/CGAL/Iso_cuboid_3.h +++ b/Kernel_23/include/CGAL/Iso_cuboid_3.h @@ -34,7 +34,7 @@ class Iso_cuboid_3 : public R_::Kernel_base::Iso_cuboid_3 typedef typename R_::Aff_transformation_3 Aff_transformation_3; typedef Iso_cuboid_3 Self; - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); public: diff --git a/Kernel_23/include/CGAL/Iso_rectangle_2.h b/Kernel_23/include/CGAL/Iso_rectangle_2.h index 49d2a03b6c3..b94e3a2086a 100644 --- a/Kernel_23/include/CGAL/Iso_rectangle_2.h +++ b/Kernel_23/include/CGAL/Iso_rectangle_2.h @@ -33,7 +33,7 @@ class Iso_rectangle_2 : public R_::Kernel_base::Iso_rectangle_2 typedef typename R_::Aff_transformation_2 Aff_transformation_2; typedef Iso_rectangle_2 Self; - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); public: diff --git a/Kernel_23/include/CGAL/Line_2.h b/Kernel_23/include/CGAL/Line_2.h index 528740a01a9..81663f03374 100644 --- a/Kernel_23/include/CGAL/Line_2.h +++ b/Kernel_23/include/CGAL/Line_2.h @@ -41,7 +41,7 @@ class Line_2 : public R_::Kernel_base::Line_2 typedef typename R_::Kernel_base::Line_2 RLine_2; typedef Line_2 Self; - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); public: diff --git a/Kernel_23/include/CGAL/Line_3.h b/Kernel_23/include/CGAL/Line_3.h index 929d658cdc7..6af58a3cfe1 100644 --- a/Kernel_23/include/CGAL/Line_3.h +++ b/Kernel_23/include/CGAL/Line_3.h @@ -38,7 +38,7 @@ class Line_3 : public R_::Kernel_base::Line_3 typedef typename R_::Aff_transformation_3 Aff_transformation_3; typedef Line_3 Self; - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); public: diff --git a/Kernel_23/include/CGAL/Plane_3.h b/Kernel_23/include/CGAL/Plane_3.h index 104191a5d64..f41fc96bb81 100644 --- a/Kernel_23/include/CGAL/Plane_3.h +++ b/Kernel_23/include/CGAL/Plane_3.h @@ -41,7 +41,7 @@ class Plane_3 : public R_::Kernel_base::Plane_3 typedef typename R_::Aff_transformation_3 Aff_transformation_3; typedef Plane_3 Self; - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); public: diff --git a/Kernel_23/include/CGAL/Point_2.h b/Kernel_23/include/CGAL/Point_2.h index 87728264781..ee8df80b329 100644 --- a/Kernel_23/include/CGAL/Point_2.h +++ b/Kernel_23/include/CGAL/Point_2.h @@ -37,7 +37,7 @@ class Point_2 : public R_::Kernel_base::Point_2 typedef typename R_::Kernel_base::Point_2 RPoint_2; typedef Point_2 Self; - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); public: diff --git a/Kernel_23/include/CGAL/Point_3.h b/Kernel_23/include/CGAL/Point_3.h index 03d00f78f3f..27d1d19e0df 100644 --- a/Kernel_23/include/CGAL/Point_3.h +++ b/Kernel_23/include/CGAL/Point_3.h @@ -34,7 +34,7 @@ class Point_3 : public R_::Kernel_base::Point_3 typedef typename R_::Aff_transformation_3 Aff_transformation_3; typedef Point_3 Self; - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); public: diff --git a/Kernel_23/include/CGAL/Ray_2.h b/Kernel_23/include/CGAL/Ray_2.h index d9dae50482e..73eecc1c025 100644 --- a/Kernel_23/include/CGAL/Ray_2.h +++ b/Kernel_23/include/CGAL/Ray_2.h @@ -42,7 +42,7 @@ class Ray_2 : public R_::Kernel_base::Ray_2 typedef typename R_::Kernel_base::Ray_2 RRay_2; typedef Ray_2 Self; - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); public: diff --git a/Kernel_23/include/CGAL/Ray_3.h b/Kernel_23/include/CGAL/Ray_3.h index b35ae5e78a9..c2880eab254 100644 --- a/Kernel_23/include/CGAL/Ray_3.h +++ b/Kernel_23/include/CGAL/Ray_3.h @@ -36,7 +36,7 @@ class Ray_3 : public R_::Kernel_base::Ray_3 typedef typename R_::Aff_transformation_3 Aff_transformation_3; typedef Ray_3 Self; - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); public: diff --git a/Kernel_23/include/CGAL/Segment_2.h b/Kernel_23/include/CGAL/Segment_2.h index 6209c3a8139..b789fe25aac 100644 --- a/Kernel_23/include/CGAL/Segment_2.h +++ b/Kernel_23/include/CGAL/Segment_2.h @@ -40,7 +40,7 @@ class Segment_2 : public R_::Kernel_base::Segment_2 typedef typename R_::Kernel_base::Segment_2 RSegment_2; typedef Segment_2 Self; - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); public: diff --git a/Kernel_23/include/CGAL/Segment_3.h b/Kernel_23/include/CGAL/Segment_3.h index 7023f5fe3fe..45aa885fe1d 100644 --- a/Kernel_23/include/CGAL/Segment_3.h +++ b/Kernel_23/include/CGAL/Segment_3.h @@ -38,7 +38,7 @@ class Segment_3 : public R_::Kernel_base::Segment_3 typedef typename R_::Aff_transformation_3 Aff_transformation_3; typedef Segment_3 Self; - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); public: diff --git a/Kernel_23/include/CGAL/Sphere_3.h b/Kernel_23/include/CGAL/Sphere_3.h index 310303fed64..76fa374f831 100644 --- a/Kernel_23/include/CGAL/Sphere_3.h +++ b/Kernel_23/include/CGAL/Sphere_3.h @@ -37,7 +37,7 @@ class Sphere_3 : public R_::Kernel_base::Sphere_3 typedef typename R_::Aff_transformation_3 Aff_transformation_3; typedef Sphere_3 Self; - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); public: diff --git a/Kernel_23/include/CGAL/Tetrahedron_3.h b/Kernel_23/include/CGAL/Tetrahedron_3.h index a8768746f58..58710cbd72c 100644 --- a/Kernel_23/include/CGAL/Tetrahedron_3.h +++ b/Kernel_23/include/CGAL/Tetrahedron_3.h @@ -33,7 +33,7 @@ class Tetrahedron_3 : public R_::Kernel_base::Tetrahedron_3 typedef typename R_::Aff_transformation_3 Aff_transformation_3; typedef Tetrahedron_3 Self; - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); public: diff --git a/Kernel_23/include/CGAL/Triangle_2.h b/Kernel_23/include/CGAL/Triangle_2.h index cf35524a6a4..1e1d38e707e 100644 --- a/Kernel_23/include/CGAL/Triangle_2.h +++ b/Kernel_23/include/CGAL/Triangle_2.h @@ -35,7 +35,7 @@ class Triangle_2 : public R_::Kernel_base::Triangle_2 typedef typename R_::Kernel_base::Triangle_2 RTriangle_2; typedef Triangle_2 Self; - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); public: diff --git a/Kernel_23/include/CGAL/Triangle_3.h b/Kernel_23/include/CGAL/Triangle_3.h index 1496121d9fe..1fe15d8ff8d 100644 --- a/Kernel_23/include/CGAL/Triangle_3.h +++ b/Kernel_23/include/CGAL/Triangle_3.h @@ -36,7 +36,7 @@ class Triangle_3 : public R_::Kernel_base::Triangle_3 typedef typename R_::Aff_transformation_3 Aff_transformation_3; typedef Triangle_3 Self; - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); public: diff --git a/Kernel_23/include/CGAL/Vector_2.h b/Kernel_23/include/CGAL/Vector_2.h index 6e62f77fa5d..dcb85eaeb4a 100644 --- a/Kernel_23/include/CGAL/Vector_2.h +++ b/Kernel_23/include/CGAL/Vector_2.h @@ -42,7 +42,7 @@ class Vector_2 : public R_::Kernel_base::Vector_2 typedef typename R_::Kernel_base::Vector_2 RVector_2; typedef Vector_2 Self; - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); public: diff --git a/Kernel_23/include/CGAL/Vector_3.h b/Kernel_23/include/CGAL/Vector_3.h index f81aee480f4..0d3f16fc2fc 100644 --- a/Kernel_23/include/CGAL/Vector_3.h +++ b/Kernel_23/include/CGAL/Vector_3.h @@ -42,7 +42,7 @@ class Vector_3 : public R_::Kernel_base::Vector_3 typedef typename R_::Aff_transformation_3 Aff_transformation_3; typedef Vector_3 Self; - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); public: diff --git a/Kernel_23/include/CGAL/Weighted_point_2.h b/Kernel_23/include/CGAL/Weighted_point_2.h index ea4364644a8..d2c4f4a48e1 100644 --- a/Kernel_23/include/CGAL/Weighted_point_2.h +++ b/Kernel_23/include/CGAL/Weighted_point_2.h @@ -34,7 +34,7 @@ class Weighted_point_2 : public R_::Kernel_base::Weighted_point_2 typedef typename R_::FT RT; typedef Weighted_point_2 Self; - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); public: typedef Dimension_tag<2> Ambient_dimension; diff --git a/Kernel_23/include/CGAL/Weighted_point_3.h b/Kernel_23/include/CGAL/Weighted_point_3.h index c57467fb17a..b9358604af8 100644 --- a/Kernel_23/include/CGAL/Weighted_point_3.h +++ b/Kernel_23/include/CGAL/Weighted_point_3.h @@ -34,7 +34,7 @@ class Weighted_point_3 : public R_::Kernel_base::Weighted_point_3 typedef typename R_::FT FT; typedef Weighted_point_3 Self; - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); public: diff --git a/Kernel_23/test/Kernel_23/include/CGAL/_test_cls_point_2.h b/Kernel_23/test/Kernel_23/include/CGAL/_test_cls_point_2.h index 6ea80be2a41..c6d25336aa2 100644 --- a/Kernel_23/test/Kernel_23/include/CGAL/_test_cls_point_2.h +++ b/Kernel_23/test/Kernel_23/include/CGAL/_test_cls_point_2.h @@ -60,9 +60,9 @@ _test_cls_point_2(const R& ) CGAL::Weighted_point_2 wp(p1); CGAL::Point_2 p7(wp); - CGAL_static_assertion(!(boost::is_convertible, + static_assert(!(boost::is_convertible, CGAL::Point_2 >::value)); - CGAL_static_assertion(!(boost::is_convertible, + static_assert(!(boost::is_convertible, CGAL::Weighted_point_2 >::value)); std::cout << '.'; diff --git a/Kernel_23/test/Kernel_23/include/CGAL/_test_cls_point_3.h b/Kernel_23/test/Kernel_23/include/CGAL/_test_cls_point_3.h index b09c11e47a7..f96de09c0d9 100644 --- a/Kernel_23/test/Kernel_23/include/CGAL/_test_cls_point_3.h +++ b/Kernel_23/test/Kernel_23/include/CGAL/_test_cls_point_3.h @@ -58,9 +58,9 @@ _test_cls_point_3(const R& ) CGAL::Weighted_point_3 wp(p1); CGAL::Point_3 p7(wp); - CGAL_static_assertion(!(boost::is_convertible, + static_assert(!(boost::is_convertible, CGAL::Point_3 >::value)); - CGAL_static_assertion(!(boost::is_convertible, + static_assert(!(boost::is_convertible, CGAL::Weighted_point_3 >::value)); std::cout << '.'; diff --git a/Linear_cell_complex/include/CGAL/CMap_linear_cell_complex_storages.h b/Linear_cell_complex/include/CGAL/CMap_linear_cell_complex_storages.h index 1ec9a1d66af..525c35eaec7 100644 --- a/Linear_cell_complex/include/CGAL/CMap_linear_cell_complex_storages.h +++ b/Linear_cell_complex/include/CGAL/CMap_linear_cell_complex_storages.h @@ -253,7 +253,7 @@ namespace CGAL { template typename Attribute_descriptor::type attribute(Dart_descriptor ADart) { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "attribute called but i-attributes are disabled."); return std::get::value> (ADart->mattribute_descriptors); @@ -262,7 +262,7 @@ namespace CGAL { typename Attribute_const_descriptor::type attribute(Dart_const_descriptor ADart) const { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "attribute called but i-attributes are disabled."); return std::get::value> (ADart->mattribute_descriptors); @@ -273,7 +273,7 @@ namespace CGAL { typename Attribute_descriptor::type copy_attribute (typename Attribute_const_descriptor::type ah) { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "copy_attribute called but i-attributes are disabled."); typename Attribute_descriptor::type res= std::get::value> diff --git a/Linear_cell_complex/include/CGAL/CMap_linear_cell_complex_storages_with_index.h b/Linear_cell_complex/include/CGAL/CMap_linear_cell_complex_storages_with_index.h index 8417e20b226..56010ad433a 100644 --- a/Linear_cell_complex/include/CGAL/CMap_linear_cell_complex_storages_with_index.h +++ b/Linear_cell_complex/include/CGAL/CMap_linear_cell_complex_storages_with_index.h @@ -287,7 +287,7 @@ namespace CGAL { template typename Attribute_descriptor::type attribute(Dart_descriptor ADart) { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "attribute called but i-attributes are disabled."); return std::get::value> (mdarts[ADart].mattribute_descriptors); @@ -296,7 +296,7 @@ namespace CGAL { typename Attribute_const_descriptor::type attribute(Dart_const_descriptor ADart) const { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "attribute called but i-attributes are disabled."); return std::get::value> (mdarts[ADart].mattribute_descriptors); @@ -307,7 +307,7 @@ namespace CGAL { typename Attribute_descriptor::type copy_attribute (typename Attribute_const_descriptor::type ah) { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "copy_attribute called but i-attributes are disabled."); // We need to do a reserve before the emplace in order to avoid a bug of // invalid reference when the container is reallocated. diff --git a/Linear_cell_complex/include/CGAL/GMap_linear_cell_complex_storages.h b/Linear_cell_complex/include/CGAL/GMap_linear_cell_complex_storages.h index c2331a6acfb..2d4b0f67537 100644 --- a/Linear_cell_complex/include/CGAL/GMap_linear_cell_complex_storages.h +++ b/Linear_cell_complex/include/CGAL/GMap_linear_cell_complex_storages.h @@ -250,7 +250,7 @@ namespace CGAL { template typename Attribute_descriptor::type attribute(Dart_descriptor ADart) { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "attribute called but i-attributes are disabled."); return std::get::value> (ADart->mattribute_descriptors); @@ -259,7 +259,7 @@ namespace CGAL { typename Attribute_const_descriptor::type attribute(Dart_const_descriptor ADart) const { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "attribute called but i-attributes are disabled."); return std::get::value> (ADart->mattribute_descriptors); @@ -270,7 +270,7 @@ namespace CGAL { typename Attribute_descriptor::type copy_attribute (typename Attribute_const_descriptor::type ah) { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "copy_attribute called but i-attributes are disabled."); typename Attribute_descriptor::type res= std::get::value> diff --git a/Linear_cell_complex/include/CGAL/GMap_linear_cell_complex_storages_with_index.h b/Linear_cell_complex/include/CGAL/GMap_linear_cell_complex_storages_with_index.h index 27d58a7651a..5d260bee1ec 100644 --- a/Linear_cell_complex/include/CGAL/GMap_linear_cell_complex_storages_with_index.h +++ b/Linear_cell_complex/include/CGAL/GMap_linear_cell_complex_storages_with_index.h @@ -239,7 +239,7 @@ namespace CGAL { template typename Attribute_descriptor::type attribute(Dart_descriptor ADart) { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "attribute called but i-attributes are disabled."); return std::get::value> (mdarts[ADart].mattribute_descriptors); @@ -248,7 +248,7 @@ namespace CGAL { typename Attribute_const_descriptor::type attribute(Dart_const_descriptor ADart) const { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "attribute called but i-attributes are disabled."); return std::get::value> (mdarts[ADart].mattribute_descriptors); @@ -259,7 +259,7 @@ namespace CGAL { typename Attribute_descriptor::type copy_attribute (typename Attribute_const_descriptor::type ah) { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, + static_assert(Helper::template Dimension_index::value>=0, "copy_attribute called but i-attributes are disabled."); // We need to do a reserve before the emplace in order to avoid a bug of // invalid reference when the container is reallocated. diff --git a/Linear_cell_complex/include/CGAL/Linear_cell_complex_base.h b/Linear_cell_complex/include/CGAL/Linear_cell_complex_base.h index 4569404479d..4669765f493 100644 --- a/Linear_cell_complex/include/CGAL/Linear_cell_complex_base.h +++ b/Linear_cell_complex/include/CGAL/Linear_cell_complex_base.h @@ -775,7 +775,7 @@ namespace CGAL { Dart_descriptor insert_point_in_cell(Dart_descriptor dh, const Point& p, bool update_attributes=true) { - CGAL_static_assertion(1<=i && i<=2); + static_assert(1<=i && i<=2); if (i==1) return insert_point_in_cell_1(dh, p, update_attributes); return insert_point_in_cell_2(dh, p, update_attributes); } diff --git a/Linear_cell_complex/include/CGAL/Linear_cell_complex_constructors.h b/Linear_cell_complex/include/CGAL/Linear_cell_complex_constructors.h index 1bdac283a67..e770c67e86c 100644 --- a/Linear_cell_complex/include/CGAL/Linear_cell_complex_constructors.h +++ b/Linear_cell_complex/include/CGAL/Linear_cell_complex_constructors.h @@ -48,7 +48,7 @@ namespace CGAL { typedef typename std::list::iterator List_iterator; typedef typename LCC::Point Point; - CGAL_static_assertion( LCC::dimension>=2 && LCC::ambient_dimension==2 ); + static_assert( LCC::dimension>=2 && LCC::ambient_dimension==2 ); CGAL_assertion(edge_indices.size() % 2 == 0); std::vector< typename LCC::Vertex_attribute_descriptor > initVertices; diff --git a/Linear_cell_complex/include/CGAL/Linear_cell_complex_operations.h b/Linear_cell_complex/include/CGAL/Linear_cell_complex_operations.h index 4728c9bf2f3..a895b915b78 100644 --- a/Linear_cell_complex/include/CGAL/Linear_cell_complex_operations.h +++ b/Linear_cell_complex/include/CGAL/Linear_cell_complex_operations.h @@ -120,7 +120,7 @@ namespace CGAL { static typename LCC::Point run(const LCC& amap, typename LCC::Dart_const_descriptor adart) { - CGAL_static_assertion(0 const Point_3& weighted_circumcenter(const GT_& gt) const { - CGAL_static_assertion((std::is_same::value)); if (internal_tbb::is_null(weighted_circumcenter_)) { this->try_to_set_circumcenter( diff --git a/Mesh_3/include/CGAL/Mesh_criteria_3.h b/Mesh_3/include/CGAL/Mesh_criteria_3.h index c7dcfeb33ab..71e0aa81394 100644 --- a/Mesh_3/include/CGAL/Mesh_criteria_3.h +++ b/Mesh_3/include/CGAL/Mesh_criteria_3.h @@ -98,7 +98,7 @@ public: template void add_facet_criterion(Facet_criterion* criterion) { - CGAL_static_assertion((boost::is_base_of< + static_assert((boost::is_base_of< typename Facet_criteria::Abstract_criterion, Facet_criterion >::value)); @@ -107,7 +107,7 @@ public: template void add_cell_criterion(Cell_criterion* criterion) { - CGAL_static_assertion((boost::is_base_of< + static_assert((boost::is_base_of< typename Cell_criteria::Abstract_criterion, Cell_criterion >::value)); diff --git a/Mesh_3/test/Mesh_3/test_meshing_3D_image.cpp b/Mesh_3/test/Mesh_3/test_meshing_3D_image.cpp index 9885213a25c..a427fa7327d 100644 --- a/Mesh_3/test/Mesh_3/test_meshing_3D_image.cpp +++ b/Mesh_3/test/Mesh_3/test_meshing_3D_image.cpp @@ -68,7 +68,7 @@ public: this->verify(c3t3,domain,criteria, Bissection_tag()); typedef typename Mesh_domain::Surface_patch_index Patch_id; - CGAL_static_assertion(CGAL::Output_rep::is_specialized); + static_assert(CGAL::Output_rep::is_specialized); CGAL_USE_TYPE(Patch_id); } diff --git a/Mesh_3/test/Mesh_3/test_meshing_3D_image_deprecated.cpp b/Mesh_3/test/Mesh_3/test_meshing_3D_image_deprecated.cpp index ed1a1fbd14b..d7689920363 100644 --- a/Mesh_3/test/Mesh_3/test_meshing_3D_image_deprecated.cpp +++ b/Mesh_3/test/Mesh_3/test_meshing_3D_image_deprecated.cpp @@ -50,7 +50,7 @@ public: this->verify(c3t3,domain,criteria, Bissection_tag()); typedef typename Mesh_domain::Surface_patch_index Patch_id; - CGAL_static_assertion(CGAL::Output_rep::is_specialized); + static_assert(CGAL::Output_rep::is_specialized); CGAL_USE_TYPE(Patch_id); } diff --git a/Mesh_3/test/Mesh_3/test_meshing_3D_image_with_features.cpp b/Mesh_3/test/Mesh_3/test_meshing_3D_image_with_features.cpp index 1c9607d45cc..15682e0429b 100644 --- a/Mesh_3/test/Mesh_3/test_meshing_3D_image_with_features.cpp +++ b/Mesh_3/test/Mesh_3/test_meshing_3D_image_with_features.cpp @@ -85,7 +85,7 @@ struct Image_tester : public Tester this->verify(c3t3, domain, criteria, Bissection_tag()); typedef typename Mesh_domain::Surface_patch_index Patch_id; - CGAL_static_assertion(CGAL::Output_rep::is_specialized); + static_assert(CGAL::Output_rep::is_specialized); CGAL_USE_TYPE(Patch_id); } diff --git a/Mesh_3/test/Mesh_3/test_meshing_polyhedron.cpp b/Mesh_3/test/Mesh_3/test_meshing_polyhedron.cpp index 9a0c5677168..76addcd6f61 100644 --- a/Mesh_3/test/Mesh_3/test_meshing_polyhedron.cpp +++ b/Mesh_3/test/Mesh_3/test_meshing_polyhedron.cpp @@ -35,7 +35,7 @@ struct Polyhedron_tester : public Tester typedef CGAL::Polyhedron_3 Polyhedron; typedef CGAL::Polyhedral_mesh_domain_3 Mesh_domain; - CGAL_static_assertion((std::is_same< + static_assert((std::is_same< typename Mesh_domain::Surface_patch_index, std::pair >::value)); diff --git a/Nef_2/include/CGAL/Nef_2/PM_overlayer.h b/Nef_2/include/CGAL/Nef_2/PM_overlayer.h index a28160ed477..5ce03215db3 100644 --- a/Nef_2/include/CGAL/Nef_2/PM_overlayer.h +++ b/Nef_2/include/CGAL/Nef_2/PM_overlayer.h @@ -959,7 +959,7 @@ bool is_forward_edge(const Const_decorator& N, void assert_type_precondition() const { typename PM_decorator_::Point p1; Point p2; - CGAL_static_assertion((std::is_same::value)); } + static_assert((std::is_same::value)); } diff --git a/NewKernel_d/include/CGAL/NewKernel_d/Kernel_d_interface.h b/NewKernel_d/include/CGAL/NewKernel_d/Kernel_d_interface.h index 50ac9fbedf8..b00b0af2d16 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/Kernel_d_interface.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/Kernel_d_interface.h @@ -135,8 +135,8 @@ template struct Kernel_d_interface : public Base_ { typedef typename Base::Point_cartesian_const_iterator result_type; // Kernel_d requires a common iterator type for points and vectors // TODO: provide this mixed functor in preKernel? - // CGAL_static_assertion((std::is_same::type>::type, result_type>::value)); - // CGAL_static_assertion((std::is_same::type, result_type>::value)); + // static_assert((std::is_same::type>::type, result_type>::value)); + // static_assert((std::is_same::type, result_type>::value)); template auto operator()(Point_d const&p, Tag_ t)const{ return CPI(this->kernel())(p,t); diff --git a/NewKernel_d/include/CGAL/NewKernel_d/Vector/array.h b/NewKernel_d/include/CGAL/NewKernel_d/Vector/array.h index 88a4ed421a9..be1b2b3a6f0 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/Vector/array.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/Vector/array.h @@ -41,7 +41,7 @@ template struct Array_vector { template struct Property : boost::false_type {}; static const unsigned d_=Max_dim_::value; - CGAL_static_assertion(d_ != (unsigned)UNKNOWN_DIMENSION); + static_assert(d_ != (unsigned)UNKNOWN_DIMENSION); typedef std::array Vector; struct Construct_vector { diff --git a/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Hyperplane_d.h b/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Hyperplane_d.h index 2eae60f5576..c4f7a47040b 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Hyperplane_d.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Hyperplane_d.h @@ -32,7 +32,7 @@ class Hyperplane_d : public Get_type:: typedef typename Get_functor::type HTBase; typedef Hyperplane_d Self; - CGAL_static_assertion((std::is_same::type>::value)); + static_assert((std::is_same::type>::value)); public: diff --git a/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Point_d.h b/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Point_d.h index 42d94a93c73..ed038e9c95f 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Point_d.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Point_d.h @@ -40,7 +40,7 @@ class Point_d : public Get_type::type typedef Point_d Self; - CGAL_static_assertion((std::is_same::type>::value)); + static_assert((std::is_same::type>::value)); public: diff --git a/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Ref_count_obj.h b/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Ref_count_obj.h index fefbca812b7..364a4184e96 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Ref_count_obj.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Ref_count_obj.h @@ -33,7 +33,7 @@ class Ref_count_obj typedef typename Get_functor >::type CBase; typedef Ref_count_obj Self; - CGAL_static_assertion((std::is_same::type>::value)); + static_assert((std::is_same::type>::value)); public: typedef R_ R; diff --git a/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Segment_d.h b/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Segment_d.h index 28bd4e8a8a3..a45ce922e12 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Segment_d.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Segment_d.h @@ -35,7 +35,7 @@ class Segment_d : public Get_type::type typedef typename Get_functor::type CSEBase; typedef Segment_d Self; - CGAL_static_assertion((std::is_same::type>::value)); + static_assert((std::is_same::type>::value)); public: diff --git a/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Sphere_d.h b/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Sphere_d.h index 7bcd8568dcc..409c9b65e3f 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Sphere_d.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Sphere_d.h @@ -32,7 +32,7 @@ class Sphere_d : public Get_type::type typedef typename Get_functor::type SRBase; typedef Sphere_d Self; - CGAL_static_assertion((std::is_same::type>::value)); + static_assert((std::is_same::type>::value)); public: diff --git a/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Vector_d.h b/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Vector_d.h index 6d47e86d2f3..9593ef91bbc 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Vector_d.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Vector_d.h @@ -39,7 +39,7 @@ class Vector_d : public Get_type::type typedef typename Get_functor::type SLBase; typedef Vector_d Self; - CGAL_static_assertion((std::is_same::type>::value)); + static_assert((std::is_same::type>::value)); public: diff --git a/NewKernel_d/test/NewKernel_d/Epick_d.cpp b/NewKernel_d/test/NewKernel_d/Epick_d.cpp index bbc3b6a128c..1e88061cbf1 100644 --- a/NewKernel_d/test/NewKernel_d/Epick_d.cpp +++ b/NewKernel_d/test/NewKernel_d/Epick_d.cpp @@ -740,11 +740,11 @@ template struct CGAL::Epick_d; typedef CGAL::Epick_d > Ker2; typedef CGAL::Epick_d > Ker3; typedef CGAL::Epick_d Kerd; -CGAL_static_assertion((std::is_same,Ker2::Dimension>::value)); -CGAL_static_assertion((std::is_same,Ker3::Dimension>::value)); -CGAL_static_assertion((std::is_same::value)); -CGAL_static_assertion((std::is_same,CGAL::Ambient_dimension::type>::value)); -CGAL_static_assertion((std::is_same,CGAL::Ambient_dimension::type>::value)); +static_assert((std::is_same,Ker2::Dimension>::value)); +static_assert((std::is_same,Ker3::Dimension>::value)); +static_assert((std::is_same::value)); +static_assert((std::is_same,CGAL::Ambient_dimension::type>::value)); +static_assert((std::is_same,CGAL::Ambient_dimension::type>::value)); int main(){ //Broken with Linear_base_d (output iterator) //test2 >(); diff --git a/Number_types/include/CGAL/Lazy_exact_nt.h b/Number_types/include/CGAL/Lazy_exact_nt.h index 38c55c62d32..be91713a674 100644 --- a/Number_types/include/CGAL/Lazy_exact_nt.h +++ b/Number_types/include/CGAL/Lazy_exact_nt.h @@ -944,7 +944,7 @@ struct Div_mod_selector { void operator()( const NT1& x, const NT2& y, NT& q, NT& r ) const { - CGAL_static_assertion((::std::is_same< + static_assert((::std::is_same< typename Coercion_traits< NT1, NT2 >::Type, NT >::value)); @@ -1029,7 +1029,7 @@ template < typename ET > class Real_embeddable_traits< Lazy_exact_nt > : public INTERN_RET::Real_embeddable_traits_base< Lazy_exact_nt , CGAL::Tag_true > { // Every type ET of Lazy_exact_nt has to be real embeddable. - CGAL_static_assertion((::std::is_same< typename Real_embeddable_traits< ET > + static_assert((::std::is_same< typename Real_embeddable_traits< ET > ::Is_real_embeddable, Tag_true >::value)); public: diff --git a/Number_types/include/CGAL/Mpzf.h b/Number_types/include/CGAL/Mpzf.h index c2689f3ee45..daa0d9222b5 100644 --- a/Number_types/include/CGAL/Mpzf.h +++ b/Number_types/include/CGAL/Mpzf.h @@ -148,7 +148,7 @@ template struct pool2 { static bool empty() { return data() == 0; } static const int extra = 1; // TODO: handle the case where a pointer is larger than a mp_limb_t private: - CGAL_static_assertion(sizeof(T) >= sizeof(T*)); + static_assert(sizeof(T) >= sizeof(T*)); static T& data () { static CGAL_MPZF_TLS T data_ = 0; return data_; @@ -162,7 +162,7 @@ template struct pool3 { static bool empty() { return data() == 0; } static const int extra = 1; // TODO: handle the case where a pointer is larger than a mp_limb_t private: - CGAL_static_assertion(sizeof(T) >= sizeof(T*)); + static_assert(sizeof(T) >= sizeof(T*)); struct cleaner { T data_ = 0; ~cleaner(){ @@ -455,7 +455,7 @@ struct Mpzf { } int e1 = (int)dexp+13; // FIXME: make it more general! But not slower... - CGAL_static_assertion(GMP_NUMB_BITS == 64); + static_assert(GMP_NUMB_BITS == 64); int e2 = e1 % 64; exp = e1 / 64 - 17; // 52+1023+13==17*64 ? diff --git a/Number_types/include/CGAL/Root_of_traits.h b/Number_types/include/CGAL/Root_of_traits.h index a1a941277bc..c014e667293 100644 --- a/Number_types/include/CGAL/Root_of_traits.h +++ b/Number_types/include/CGAL/Root_of_traits.h @@ -150,7 +150,7 @@ private: // We have the typedef as VC10 fails with // static_assert(FrT::Is_fraction::value) typedef typename FrT::Is_fraction ISF; - CGAL_static_assertion((ISF::value)); + static_assert((ISF::value)); typedef typename FrT::Numerator_type RT; diff --git a/Number_types/include/CGAL/Test/test_root_of_traits.h b/Number_types/include/CGAL/Test/test_root_of_traits.h index ae1c7768852..23f4b5dafc7 100644 --- a/Number_types/include/CGAL/Test/test_root_of_traits.h +++ b/Number_types/include/CGAL/Test/test_root_of_traits.h @@ -28,8 +28,8 @@ void test_root_of_traits(){ typedef typename RoT::Root_of_1 Root_of_1; typedef typename RoT::Root_of_2 Root_of_2; - CGAL_static_assertion((::std::is_same::value)); - CGAL_static_assertion((::std::is_same::value)); + static_assert((::std::is_same::value)); + static_assert((::std::is_same::value)); typedef typename RoT::Make_root_of_2 Make_root_of_2; typedef typename RoT::Make_sqrt Make_sqrt; @@ -41,10 +41,10 @@ void test_root_of_traits(){ const Inverse& inverse = Inverse(); const Square& square = Square(); - CGAL_static_assertion((::std::is_same::value)); - CGAL_static_assertion((::std::is_same::value)); - CGAL_static_assertion((::std::is_same::value)); - CGAL_static_assertion((::std::is_same::value)); + static_assert((::std::is_same::value)); + static_assert((::std::is_same::value)); + static_assert((::std::is_same::value)); + static_assert((::std::is_same::value)); { diff --git a/Number_types/include/CGAL/mpq_class.h b/Number_types/include/CGAL/mpq_class.h index a651b674202..7348097644e 100644 --- a/Number_types/include/CGAL/mpq_class.h +++ b/Number_types/include/CGAL/mpq_class.h @@ -35,7 +35,7 @@ // while ::__gmp_expr is the others "expressions". #define CGAL_CHECK_GMP_EXPR_MPQ_CLASS \ - CGAL_static_assertion( \ + static_assert( \ (::std::is_same< ::__gmp_expr< T , T >,Type>::value )); namespace CGAL { diff --git a/Number_types/include/CGAL/mpz_class.h b/Number_types/include/CGAL/mpz_class.h index 9b868199f9f..c8899fc1b97 100644 --- a/Number_types/include/CGAL/mpz_class.h +++ b/Number_types/include/CGAL/mpz_class.h @@ -38,7 +38,7 @@ #include #define CGAL_CHECK_GMP_EXPR \ - CGAL_static_assertion( \ + static_assert( \ (::std::is_same< ::__gmp_expr< T , T >,Type>::value )); namespace CGAL { diff --git a/Number_types/include/CGAL/simplest_rational_in_interval.h b/Number_types/include/CGAL/simplest_rational_in_interval.h index 374d89e1fd2..a93bcc855b4 100644 --- a/Number_types/include/CGAL/simplest_rational_in_interval.h +++ b/Number_types/include/CGAL/simplest_rational_in_interval.h @@ -43,10 +43,10 @@ simplest_rational_in_interval(double x, double y) { // Must be a fraction CGAL_USE_TYPE(Is_fraction); - CGAL_static_assertion((::std::is_same::value)); + static_assert((::std::is_same::value)); // Numerator_type,Denominator_type must be the same CGAL_USE_TYPE(Denominator_type); - CGAL_static_assertion((::std::is_same::value)); + static_assert((::std::is_same::value)); if(x == y){ diff --git a/Number_types/include/CGAL/to_rational.h b/Number_types/include/CGAL/to_rational.h index add67aeb6cc..d60f56b3eb2 100644 --- a/Number_types/include/CGAL/to_rational.h +++ b/Number_types/include/CGAL/to_rational.h @@ -34,9 +34,9 @@ to_rational(double x) typedef typename FT::Denominator_type Denominator_type; typename FT::Compose compose; - CGAL_static_assertion((::std::is_same::value)); + static_assert((::std::is_same::value)); CGAL_USE_TYPE(Is_fraction); - CGAL_static_assertion((::std::is_same::value)); + static_assert((::std::is_same::value)); CGAL_USE_TYPE(Denominator_type); Numerator_type num(0),den(1); diff --git a/Number_types/test/Number_types/Lazy_exact_nt_new.cpp b/Number_types/test/Number_types/Lazy_exact_nt_new.cpp index 54a1ea8581e..f80b17bc1ba 100644 --- a/Number_types/test/Number_types/Lazy_exact_nt_new.cpp +++ b/Number_types/test/Number_types/Lazy_exact_nt_new.cpp @@ -81,9 +81,9 @@ void test_lazy_exact_nt() { typedef CGAL::Lazy_exact_nt< typename AK::Integer > LI; typedef CGAL::Lazy_exact_nt< typename AK::Rational > LR; typedef CGAL::Coercion_traits CT; - CGAL_static_assertion((std::is_same< typename CT::Are_implicit_interoperable,CGAL::Tag_true>::value)); - CGAL_static_assertion((std::is_same< typename CT::Are_explicit_interoperable,CGAL::Tag_true>::value)); - CGAL_static_assertion((std::is_same< typename CT::Type,LR>::value)); + static_assert((std::is_same< typename CT::Are_implicit_interoperable,CGAL::Tag_true>::value)); + static_assert((std::is_same< typename CT::Are_explicit_interoperable,CGAL::Tag_true>::value)); + static_assert((std::is_same< typename CT::Type,LR>::value)); LI i(4); LR r(4); @@ -99,8 +99,8 @@ void test_lazy_exact_nt() { typedef CGAL::Lazy_exact_nt T1; typedef CGAL::Lazy_exact_nt T2; typedef CGAL::Coercion_traits CT; - CGAL_static_assertion((std::is_same< typename CT::Are_implicit_interoperable,CGAL::Tag_false>::value)); - CGAL_static_assertion((std::is_same< typename CT::Are_explicit_interoperable,CGAL::Tag_false>::value)); + static_assert((std::is_same< typename CT::Are_implicit_interoperable,CGAL::Tag_false>::value)); + static_assert((std::is_same< typename CT::Are_explicit_interoperable,CGAL::Tag_false>::value)); #endif #endif } diff --git a/Number_types/test/Number_types/Quotient_new.cpp b/Number_types/test/Number_types/Quotient_new.cpp index 65450205e87..079ea8fbc02 100644 --- a/Number_types/test/Number_types/Quotient_new.cpp +++ b/Number_types/test/Number_types/Quotient_new.cpp @@ -62,9 +62,9 @@ void test_quotient() { typedef CGAL::Quotient QI; typedef CGAL::Coercion_traits CT; CGAL_USE_TYPE(CT); - CGAL_static_assertion((std::is_same< typename CT::Are_explicit_interoperable,CGAL::Tag_true>::value)); - CGAL_static_assertion((std::is_same< typename CT::Are_implicit_interoperable,CGAL::Tag_true>::value)); - CGAL_static_assertion((std::is_same< typename CT::Type,QI>::value)); + static_assert((std::is_same< typename CT::Are_explicit_interoperable,CGAL::Tag_true>::value)); + static_assert((std::is_same< typename CT::Are_implicit_interoperable,CGAL::Tag_true>::value)); + static_assert((std::is_same< typename CT::Type,QI>::value)); } } diff --git a/Number_types/test/Number_types/Sqrt_extension.h b/Number_types/test/Number_types/Sqrt_extension.h index b2c8f42d47d..547aaf10ab9 100644 --- a/Number_types/test/Number_types/Sqrt_extension.h +++ b/Number_types/test/Number_types/Sqrt_extension.h @@ -24,7 +24,7 @@ void convert_to(const NT& x, RT& r){ typedef CGAL::Coercion_traits CT; typedef typename CT::Type Type; CGAL_USE_TYPE(Type); - CGAL_static_assertion((::std::is_same::value)); + static_assert((::std::is_same::value)); r = typename CT::Cast()(x); } } //namespace CGAL @@ -700,17 +700,17 @@ void test_get_arithmetic_kernel(){ typedef CGAL::Sqrt_extension EXT; typedef typename CGAL::Get_arithmetic_kernel::Arithmetic_kernel AT_; CGAL_USE_TYPE(AT_); - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); } { typedef CGAL::Sqrt_extension EXT; typedef typename CGAL::Get_arithmetic_kernel::Arithmetic_kernel AT_; CGAL_USE_TYPE(AT_); - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); } { typedef CGAL::Sqrt_extension EXT; typedef typename CGAL::Get_arithmetic_kernel::Arithmetic_kernel AT_; CGAL_USE_TYPE(AT_); - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); } } diff --git a/Number_types/test/Number_types/include/CGAL/Test/test_root_of_2_traits.h b/Number_types/test/Number_types/include/CGAL/Test/test_root_of_2_traits.h index bb979e588f3..fddad986534 100644 --- a/Number_types/test/Number_types/include/CGAL/Test/test_root_of_2_traits.h +++ b/Number_types/test/Number_types/include/CGAL/Test/test_root_of_2_traits.h @@ -7,12 +7,12 @@ void test_root_of_traits(){ typedef typename RoT::Root_of_1 Root_of_1; typedef typename RoT::Root_of_2 Root_of_2; - CGAL_static_assertion((::std::is_same::value)); - CGAL_static_assertion((::std::is_same::value)); + static_assert((::std::is_same::value)); + static_assert((::std::is_same::value)); typedef typename RoT::Make_root_of_2 Make_root_of_2; typedef typename Make_root_of_2::result_type result_type; - CGAL_static_assertion((::std::is_same::value)); + static_assert((::std::is_same::value)); const Make_root_of_2& make_root_of_2 = Make_root_of_2(); Root_of_2 r = make_root_of_2(T(0),T(-1),T(2)); //-sqrt(2) diff --git a/Number_types/test/Number_types/ioformat.cpp b/Number_types/test/Number_types/ioformat.cpp index 4d9a6656321..54eaa26bf22 100644 --- a/Number_types/test/Number_types/ioformat.cpp +++ b/Number_types/test/Number_types/ioformat.cpp @@ -106,7 +106,7 @@ int main() // CORE #ifdef CGAL_USE_CORE - CGAL_static_assertion(CGAL::Output_rep::is_specialized == true); + static_assert(CGAL::Output_rep::is_specialized == true); //bug in io for CORE. test_it("CORE::BigInt"); test_it("CORE::BigRat"); @@ -116,7 +116,7 @@ int main() // LEDA based NTs #ifdef CGAL_USE_LEDA - CGAL_static_assertion(CGAL::Output_rep::is_specialized == true); + static_assert(CGAL::Output_rep::is_specialized == true); test_it("leda_integer"); test_it("leda_rational"); test_it("leda_bigfloat"); diff --git a/Number_types/test/Number_types/known_bit_size_integers.cpp b/Number_types/test/Number_types/known_bit_size_integers.cpp index 0172db54dac..fce35d25f64 100644 --- a/Number_types/test/Number_types/known_bit_size_integers.cpp +++ b/Number_types/test/Number_types/known_bit_size_integers.cpp @@ -7,18 +7,18 @@ int main() std::cout << "Verifying the sizes of boost::[u]int{8,16,32,64}_t" << std::endl; - CGAL_static_assertion(sizeof(boost::int8_t) == 1); - CGAL_static_assertion(sizeof(boost::int16_t) == 2); - CGAL_static_assertion(sizeof(boost::int32_t) == 4); + static_assert(sizeof(boost::int8_t) == 1); + static_assert(sizeof(boost::int16_t) == 2); + static_assert(sizeof(boost::int32_t) == 4); #ifndef BOOST_NO_INT64_T - CGAL_static_assertion(sizeof(boost::int64_t) == 8); + static_assert(sizeof(boost::int64_t) == 8); #endif - CGAL_static_assertion(sizeof(boost::uint8_t) == 1); - CGAL_static_assertion(sizeof(boost::uint16_t) == 2); - CGAL_static_assertion(sizeof(boost::uint32_t) == 4); + static_assert(sizeof(boost::uint8_t) == 1); + static_assert(sizeof(boost::uint16_t) == 2); + static_assert(sizeof(boost::uint32_t) == 4); #ifndef BOOST_NO_INT64_T - CGAL_static_assertion(sizeof(boost::uint64_t) == 8); + static_assert(sizeof(boost::uint64_t) == 8); #endif return 0; diff --git a/Number_types/test/Number_types/test_nt_Coercion_traits.cpp b/Number_types/test/Number_types/test_nt_Coercion_traits.cpp index ad73c7555c6..bb7d28b3eab 100644 --- a/Number_types/test/Number_types/test_nt_Coercion_traits.cpp +++ b/Number_types/test/Number_types/test_nt_Coercion_traits.cpp @@ -144,9 +144,9 @@ void AT_coercion_test_for_cgal_types_rat(){ typedef typename AT::Bigfloat_interval Bigfloat_interval; CGAL_USE_TYPE(Bigfloat_interval); - CGAL_static_assertion(!(::std::is_same::value)); - CGAL_static_assertion(!(::std::is_same::value)); - CGAL_static_assertion(!(::std::is_same::value)); + static_assert(!(::std::is_same::value)); + static_assert(!(::std::is_same::value)); + static_assert(!(::std::is_same::value)); CGAL::test_explicit_interoperable_from_to(); CGAL::test_explicit_interoperable_from_to(); @@ -205,10 +205,10 @@ void AT_coercion_test_for_cgal_types_fws(){ typedef typename AT::Field_with_sqrt Real; CGAL_USE_TYPE(Bigfloat_interval); - CGAL_static_assertion(!(::std::is_same::value)); - CGAL_static_assertion(!(::std::is_same::value)); - CGAL_static_assertion(!(::std::is_same::value)); - CGAL_static_assertion(!(::std::is_same::value)); + static_assert(!(::std::is_same::value)); + static_assert(!(::std::is_same::value)); + static_assert(!(::std::is_same::value)); + static_assert(!(::std::is_same::value)); typedef CGAL::Sqrt_extension Extn_1; diff --git a/Optimal_bounding_box/include/CGAL/Optimal_bounding_box/internal/optimize_2.h b/Optimal_bounding_box/include/CGAL/Optimal_bounding_box/internal/optimize_2.h index 12b37586a41..110123898a5 100644 --- a/Optimal_bounding_box/include/CGAL/Optimal_bounding_box/internal/optimize_2.h +++ b/Optimal_bounding_box/include/CGAL/Optimal_bounding_box/internal/optimize_2.h @@ -117,7 +117,7 @@ void optimize_along_OBB_axes(typename Traits::Matrix& rot, typedef typename Traits::Matrix Matrix; typedef typename Traits::Vector Vector; - CGAL_static_assertion((std::is_same::type, Point>::value)); + static_assert((std::is_same::type, Point>::value)); std::vector rotated_points; rotated_points.reserve(points.size()); diff --git a/Optimal_bounding_box/include/CGAL/Optimal_bounding_box/oriented_bounding_box.h b/Optimal_bounding_box/include/CGAL/Optimal_bounding_box/oriented_bounding_box.h index 037df452478..08b39186cf4 100644 --- a/Optimal_bounding_box/include/CGAL/Optimal_bounding_box/oriented_bounding_box.h +++ b/Optimal_bounding_box/include/CGAL/Optimal_bounding_box/oriented_bounding_box.h @@ -202,7 +202,7 @@ void construct_oriented_bounding_box(const PointRange& points, { typedef typename Traits::Point_3 Point; - CGAL_static_assertion((std::is_same::type, Point>::value)); + static_assert((std::is_same::type, Point>::value)); if(use_ch) // construct the convex hull to reduce the number of points { @@ -341,7 +341,7 @@ void oriented_bounding_box(const PointRange& points, NamedParameters, Default_traits>::type Geom_traits; - CGAL_static_assertion_msg(!(std::is_same::value), + static_assert(!(std::is_same::value), "You must provide a traits class or have Eigen enabled!"); Geom_traits traits = choose_parameter(get_parameter(np, internal_np::geom_traits)); diff --git a/Point_set_processing_3/include/CGAL/OpenGR/compute_registration_transformation.h b/Point_set_processing_3/include/CGAL/OpenGR/compute_registration_transformation.h index dcda82d9555..43bf9c7db42 100644 --- a/Point_set_processing_3/include/CGAL/OpenGR/compute_registration_transformation.h +++ b/Point_set_processing_3/include/CGAL/OpenGR/compute_registration_transformation.h @@ -309,13 +309,13 @@ compute_registration_transformation (const PointRange1& point_set_1, const Point typedef Point_set_processing_3_np_helper NP_helper2; typedef typename NP_helper1::Const_point_map PointMap1; typedef typename NP_helper2::Const_point_map PointMap2; - CGAL_static_assertion_msg((std::is_same< typename boost::property_traits::value_type, + static_assert((std::is_same< typename boost::property_traits::value_type, typename boost::property_traits::value_type> ::value), "The point type of input ranges must be the same"); typedef typename NP_helper1::Normal_map NormalMap1; typedef typename NP_helper2::Normal_map NormalMap2; - CGAL_static_assertion_msg((std::is_same< typename boost::property_traits::value_type, + static_assert((std::is_same< typename boost::property_traits::value_type, typename boost::property_traits::value_type> ::value), "The vector type of input ranges must be the same"); diff --git a/Point_set_processing_3/include/CGAL/OpenGR/register_point_sets.h b/Point_set_processing_3/include/CGAL/OpenGR/register_point_sets.h index 5e5d7853bee..08012fe3397 100644 --- a/Point_set_processing_3/include/CGAL/OpenGR/register_point_sets.h +++ b/Point_set_processing_3/include/CGAL/OpenGR/register_point_sets.h @@ -222,13 +222,13 @@ register_point_sets (const PointRange1& point_set_1, PointRange2& point_set_2, typedef Point_set_processing_3_np_helper NP_helper2; typedef typename NP_helper1::Const_point_map PointMap1; typedef typename NP_helper2::Const_point_map PointMap2; - CGAL_static_assertion_msg((std::is_same< typename boost::property_traits::value_type, + static_assert((std::is_same< typename boost::property_traits::value_type, typename boost::property_traits::value_type> ::value), "The point type of input ranges must be the same"); typedef typename NP_helper1::Normal_map NormalMap1; typedef typename NP_helper2::Normal_map NormalMap2; - CGAL_static_assertion_msg((std::is_same< typename boost::property_traits::value_type, + static_assert((std::is_same< typename boost::property_traits::value_type, typename boost::property_traits::value_type> ::value), "The vector type of input ranges must be the same"); diff --git a/Point_set_processing_3/include/CGAL/cluster_point_set.h b/Point_set_processing_3/include/CGAL/cluster_point_set.h index c79cd850df1..6381c456917 100644 --- a/Point_set_processing_3/include/CGAL/cluster_point_set.h +++ b/Point_set_processing_3/include/CGAL/cluster_point_set.h @@ -145,7 +145,7 @@ std::size_t cluster_point_set (PointRange& points, typedef typename NP_helper::Geom_traits Kernel; typedef typename Point_set_processing_3::GetAdjacencies::type Adjacencies; - CGAL_static_assertion_msg(!(std::is_same::type, + static_assert(!(std::is_same::type, typename GetSvdTraits::NoTraits>::value), "Error: no SVD traits"); diff --git a/Point_set_processing_3/include/CGAL/jet_estimate_normals.h b/Point_set_processing_3/include/CGAL/jet_estimate_normals.h index d808a6ee46f..1465fc7e357 100644 --- a/Point_set_processing_3/include/CGAL/jet_estimate_normals.h +++ b/Point_set_processing_3/include/CGAL/jet_estimate_normals.h @@ -197,7 +197,7 @@ jet_estimate_normals( typedef typename GetSvdTraits::type SvdTraits; CGAL_assertion_msg(NP_helper::has_normal_map(points, np), "Error: no normal map"); - CGAL_static_assertion_msg(!(std::is_same::NoTraits>::value), "Error: no SVD traits"); diff --git a/Point_set_processing_3/include/CGAL/jet_smooth_point_set.h b/Point_set_processing_3/include/CGAL/jet_smooth_point_set.h index c8982be7517..952f2c0d595 100644 --- a/Point_set_processing_3/include/CGAL/jet_smooth_point_set.h +++ b/Point_set_processing_3/include/CGAL/jet_smooth_point_set.h @@ -200,7 +200,7 @@ jet_smooth_point_set( typedef typename NP_helper::Geom_traits Kernel; typedef typename GetSvdTraits::type SvdTraits; - CGAL_static_assertion_msg(!(std::is_same::NoTraits>::value), "Error: no SVD traits"); diff --git a/Point_set_processing_3/include/CGAL/pointmatcher/compute_registration_transformation.h b/Point_set_processing_3/include/CGAL/pointmatcher/compute_registration_transformation.h index e8dac2ddc2b..cb47b1a69c1 100644 --- a/Point_set_processing_3/include/CGAL/pointmatcher/compute_registration_transformation.h +++ b/Point_set_processing_3/include/CGAL/pointmatcher/compute_registration_transformation.h @@ -607,13 +607,13 @@ compute_registration_transformation (const PointRange1& point_set_1, const Point // property map types typedef typename NP_helper1::Const_point_map PointMap1; typedef typename NP_helper2::Const_point_map PointMap2; - CGAL_static_assertion_msg((std::is_same< typename boost::property_traits::value_type, + static_assert((std::is_same< typename boost::property_traits::value_type, typename boost::property_traits::value_type> ::value), "The point type of input ranges must be the same"); typedef typename NP_helper1::Normal_map NormalMap1; typedef typename NP_helper2::Normal_map NormalMap2; - CGAL_static_assertion_msg((std::is_same< typename boost::property_traits::value_type, + static_assert((std::is_same< typename boost::property_traits::value_type, typename boost::property_traits::value_type> ::value), "The vector type of input ranges must be the same"); @@ -630,7 +630,7 @@ compute_registration_transformation (const PointRange1& point_set_1, const Point NormalMap2 normal_map2 = NP_helper2::get_normal_map(point_set_2, np2); auto weight_map2 = choose_parameter(get_parameter(np2, internal_np::scalar_map), DefaultWeightMap2(Scalar(1))); - CGAL_static_assertion_msg((std::is_same< typename boost::property_traits::value_type, + static_assert((std::is_same< typename boost::property_traits::value_type, typename boost::property_traits::value_type> ::value), "The scalar type of input ranges must be the same"); diff --git a/Point_set_processing_3/include/CGAL/structure_point_set.h b/Point_set_processing_3/include/CGAL/structure_point_set.h index 043001e3b04..58b3cbee86d 100644 --- a/Point_set_processing_3/include/CGAL/structure_point_set.h +++ b/Point_set_processing_3/include/CGAL/structure_point_set.h @@ -234,7 +234,7 @@ public: typedef typename Point_set_processing_3::GetPlaneIndexMap::type PlaneIndexMap; CGAL_assertion_msg(NP_helper::has_normal_map(points, np), "Error: no normal map"); - CGAL_static_assertion_msg((!is_default_parameter::value), + static_assert((!is_default_parameter::value), "Error: no plane index map"); PointMap point_map = NP_helper::get_const_point_map(points, np); diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/clip.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/clip.h index ee92e8e3640..691ddfa6a3b 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/clip.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/clip.h @@ -444,7 +444,7 @@ generic_clip_impl( typedef typename GetVertexPointMap::type Vpm2; - CGAL_static_assertion((std::is_same::value_type, + static_assert((std::is_same::value_type, typename boost::property_traits::value_type>::value)); Vpm vpm1 = choose_parameter(get_parameter(np1, internal_np::vertex_point), diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/connected_components.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/connected_components.h index 525f020a342..991c4b33c4b 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/connected_components.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/connected_components.h @@ -553,7 +553,7 @@ std::size_t keep_large_connected_components(PolygonMesh& pmesh, >::type FaceSizeMap; typedef typename boost::property_traits::value_type Face_size; - CGAL_static_assertion((std::is_convertible::value)); + static_assert((std::is_convertible::value)); typedef typename internal_np::Lookup_named_param_def::type VPM1; typedef typename GetVertexPointMap::type VPM2; - CGAL_static_assertion((std::is_same::value_type, + static_assert((std::is_same::value_type, typename boost::property_traits::value_type>::value)); VPM1 vpm1 = choose_parameter(get_parameter(np1, internal_np::vertex_point), @@ -694,7 +694,7 @@ corefine( TriangleMesh& tm1, typedef typename GetVertexPointMap::type VPM1; typedef typename GetVertexPointMap::type VPM2; - CGAL_static_assertion((std::is_same::value_type, + static_assert((std::is_same::value_type, typename boost::property_traits::value_type>::value)); VPM1 vpm1 = choose_parameter(get_parameter(np1, internal_np::vertex_point), diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/distance.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/distance.h index 4237fa85b6f..6d221c77bb9 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/distance.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/distance.h @@ -155,7 +155,7 @@ double max_distance_to_mesh_impl(const PointRange& sample_points, using FT = typename Kernel::FT; #if !defined(CGAL_LINKED_WITH_TBB) - CGAL_static_assertion_msg (!(boost::is_convertible::value), + static_assert (!(boost::is_convertible::value), "Parallel_tag is enabled but TBB is unavailable."); #else if(boost::is_convertible::value) @@ -1037,7 +1037,7 @@ sample_triangle_soup(const PointRange& points, typedef typename PointRange::value_type Point_3; typedef typename Kernel_traits::Kernel GeomTraits; - CGAL_static_assertion_msg((std::is_same::value), "Wrong point type."); + static_assert((std::is_same::value), "Wrong point type."); CGAL_precondition(!triangles.empty()); @@ -1995,7 +1995,7 @@ bounded_error_squared_one_sided_Hausdorff_distance_impl(const TriangleMesh1& tm1 OutputIterator& out) { #if !defined(CGAL_LINKED_WITH_TBB) || !defined(CGAL_METIS_ENABLED) - CGAL_static_assertion_msg(!(boost::is_convertible::value), + static_assert(!(boost::is_convertible::value), "Parallel_tag is enabled but at least TBB or METIS is unavailable."); #endif @@ -2270,7 +2270,7 @@ bounded_error_squared_symmetric_Hausdorff_distance_impl(const TriangleMesh1& tm1 OutputIterator2& out2) { #if !defined(CGAL_LINKED_WITH_TBB) || !defined(CGAL_METIS_ENABLED) - CGAL_static_assertion_msg(!(boost::is_convertible::value), + static_assert(!(boost::is_convertible::value), "Parallel_tag is enabled but at least TBB or METIS is unavailable."); #endif diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/fair.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/fair.h index 28958df8ac0..60829f72623 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/fair.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/fair.h @@ -151,11 +151,11 @@ bool fair(TriangleMesh& tmesh, #endif #if defined(CGAL_EIGEN3_ENABLED) - CGAL_static_assertion_msg( + static_assert( (!std::is_same::type, bool>::value) || EIGEN_VERSION_AT_LEAST(3, 2, 0), "The function `fair` requires Eigen3 version 3.2 or later."); #else - CGAL_static_assertion_msg( + static_assert( (!std::is_same::type, bool>::value), "The function `fair` requires Eigen3 version 3.2 or later."); #endif diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersect_triangle_and_segment_3.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersect_triangle_and_segment_3.h index 47be440cd3a..aaf34efd11d 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersect_triangle_and_segment_3.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersect_triangle_and_segment_3.h @@ -98,7 +98,7 @@ intersection_type( typedef typename boost::property_traits::value_type Point_3; typedef typename Kernel_traits::Kernel Kernel; - CGAL_static_assertion((std::is_same::value_type>::value)); + static_assert((std::is_same::value_type>::value)); halfedge_descriptor h_2=halfedge(f_2,tm2); diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_nodes.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_nodes.h index 64933af6b3b..81f3ca6478d 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_nodes.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_nodes.h @@ -49,7 +49,7 @@ public: private: //typedefs typedef typename boost::property_traits::value_type Point_3; - CGAL_static_assertion((std::is_same::value_type, + static_assert((std::is_same::value_type, typename boost::property_traits::value_type>::value)); typedef typename Kernel_traits::Kernel Input_kernel; @@ -151,7 +151,7 @@ public: private: typedef typename boost::property_traits::value_type Point_3; - CGAL_static_assertion((std::is_same::value_type, + static_assert((std::is_same::value_type, typename boost::property_traits::value_type>::value)); typedef typename Kernel_traits::Kernel Input_kernel; @@ -328,7 +328,7 @@ class Intersection_nodes::value_type Point_3; - CGAL_static_assertion((std::is_same::value_type, + static_assert((std::is_same::value_type, typename boost::property_traits::value_type>::value)); typedef typename Kernel_traits::Kernel Input_kernel; diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_of_coplanar_triangles_3.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_of_coplanar_triangles_3.h index 0e73d4be013..7929697aec2 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_of_coplanar_triangles_3.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_of_coplanar_triangles_3.h @@ -32,7 +32,7 @@ struct Intersect_coplanar_faces_3 // typedefs typedef typename boost::property_traits::value_type Point; - CGAL_static_assertion((std::is_same::value_type, + static_assert((std::is_same::value_type, typename boost::property_traits::value_type>::value)); typedef typename CGAL::Kernel_traits::Kernel Input_kernel; diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Snapping/snap.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Snapping/snap.h index 62c1dc6d3e2..3effaee63d3 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Snapping/snap.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Snapping/snap.h @@ -925,7 +925,7 @@ std::size_t snap_non_conformal_one_way(const HalfedgeRange& halfedge_range_S, #endif #ifndef CGAL_LINKED_WITH_TBB - CGAL_static_assertion_msg (!(std::is_convertible::value), + static_assert (!(std::is_convertible::value), "Parallel_tag is enabled but TBB is unavailable."); #else // CGAL_LINKED_WITH_TBB if(std::is_convertible::value) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Snapping/snap_vertices.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Snapping/snap_vertices.h index d821f88320b..a9128a244df 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Snapping/snap_vertices.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Snapping/snap_vertices.h @@ -371,7 +371,7 @@ void find_vertex_vertex_matches_with_kd_tree(Unique_positions& unique_positions_ tree.insert(unique_positions_Bv.begin(), unique_positions_Bv.end()); #if !defined(CGAL_LINKED_WITH_TBB) - CGAL_static_assertion_msg (!(std::is_convertible::value), + static_assert (!(std::is_convertible::value), "Parallel_tag is enabled but TBB is unavailable."); #else // parallel @@ -596,7 +596,7 @@ void find_vertex_vertex_matches_with_box_d(const Unique_positions& unique_positi boxes_B_ptr.push_back(&b); #if !defined(CGAL_LINKED_WITH_TBB) - CGAL_static_assertion_msg (!(std::is_convertible::value), + static_assert (!(std::is_convertible::value), "Parallel_tag is enabled but TBB is unavailable."); #else // CGAL_LINKED_WITH_TBB if(std::is_convertible::value) @@ -729,7 +729,7 @@ std::size_t snap_vertices_two_way(const HalfedgeRange_A& halfedge_range_A, using parameters::get_parameter; using parameters::get_parameter_reference; - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); GT gt = choose_parameter(get_parameter(np_A, internal_np::geom_traits)); VPM_A vpm_A = choose_parameter(get_parameter(np_A, internal_np::vertex_point), diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/intersection.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/intersection.h index 7d1b1b6e6bf..4f66b558cc7 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/intersection.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/intersection.h @@ -425,7 +425,7 @@ compute_face_face_intersection(const FaceRange& face_range1, get_const_property_map(boost::vertex_point, tm1)); VertexPointMap2 vpmap2 = choose_parameter(get_parameter(np2, internal_np::vertex_point), get_const_property_map(boost::vertex_point, tm2)); - CGAL_static_assertion( + static_assert( (std::is_same< typename boost::property_traits::value_type, typename boost::property_traits::value_type @@ -543,7 +543,7 @@ compute_face_polyline_intersection(const FaceRange& face_range, VertexPointMap vpmap = choose_parameter(get_parameter(np, internal_np::vertex_point), get_const_property_map(boost::vertex_point, tm)); typedef typename boost::property_traits::value_type Point; - CGAL_static_assertion( + static_assert( (std::is_same::type>::value)); @@ -681,7 +681,7 @@ compute_face_polylines_intersection(const FaceRange& face_range, get_const_property_map(boost::vertex_point, tm)); typedef typename boost::property_traits::value_type Point; typedef typename boost::range_value::type Polyline; - CGAL_static_assertion((std::is_same::type>::value)); + static_assert((std::is_same::type>::value)); std::vector faces; faces.reserve(std::distance( boost::begin(face_range), boost::end(face_range) )); @@ -1742,7 +1742,7 @@ surface_intersection(const TriangleMesh& tm1, typedef typename GetVertexPointMap::const_type VPM1; typedef typename GetVertexPointMap::const_type VPM2; - CGAL_static_assertion((std::is_same::value_type, + static_assert((std::is_same::value_type, typename boost::property_traits::value_type>::value)); VPM1 vpm1 = parameters::choose_parameter(parameters::get_parameter(np1, internal_np::vertex_point), diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/locate.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/locate.h index 2d5d92374ba..04e5cc6a144 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/locate.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/locate.h @@ -1661,7 +1661,7 @@ locate_with_AABB_tree(const typename internal::Location_traits AABB_traits; typedef typename Primitive::Point Point_3; - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); typedef typename GetVertexPointMap::const_type VertexPointMap; typedef internal::Point_to_Point_3_VPM WrappedVPM; @@ -1754,7 +1754,7 @@ locate(const typename internal::Location_traits:: using parameters::get_parameter; using parameters::choose_parameter; - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); const VertexPointMap vpm = parameters::choose_parameter(parameters::get_parameter(np, internal_np::vertex_point), get_const_property_map(boost::vertex_point, tm)); diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h index ac5a340d816..96af10bad1e 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h @@ -985,7 +985,7 @@ void match_faces(const PolygonMesh1& m1, get_const_property_map(vertex_point, m1)); const VPMap2 vpm2 = choose_parameter(get_parameter(np2, internal_np::vertex_point), get_const_property_map(vertex_point, m2)); - CGAL_static_assertion_msg((std::is_same::value_type, + static_assert((std::is_same::value_type, typename boost::property_traits::value_type>::value), "Both vertex point maps must have the same point type."); diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/orient_polygon_soup_extension.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/orient_polygon_soup_extension.h index 612620049a0..e395080f4a7 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/orient_polygon_soup_extension.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/orient_polygon_soup_extension.h @@ -159,7 +159,7 @@ void orient_triangle_soup_with_reference_triangle_soup(const ReferencePointRange typedef typename boost::property_traits::reference PM2_Point_ref; typedef typename boost::property_traits::value_type Point_3; - CGAL_static_assertion((std::is_same::value_type>::value)); + static_assert((std::is_same::value_type>::value)); typedef typename CGAL::Kernel_traits::Kernel K; typedef typename K::Triangle_3 Triangle; @@ -215,7 +215,7 @@ void orient_triangle_soup_with_reference_triangle_soup(const ReferencePointRange }; #if !defined(CGAL_LINKED_WITH_TBB) - CGAL_static_assertion_msg (!(std::is_convertible::value), + static_assert (!(std::is_convertible::value), "Parallel_tag is enabled but TBB is unavailable."); #else if(std::is_convertible::value) @@ -309,7 +309,7 @@ void orient_triangle_soup_with_reference_triangle_mesh(const TriangleMesh& tm_re PointMap point_map = NP_helper::get_const_point_map(points, np2); - CGAL_static_assertion((std::is_same::value_type>::value)); + static_assert((std::is_same::value_type>::value)); K k = choose_parameter(get_parameter(np1, internal_np::geom_traits)); @@ -352,7 +352,7 @@ void orient_triangle_soup_with_reference_triangle_mesh(const TriangleMesh& tm_re }; #if !defined(CGAL_LINKED_WITH_TBB) - CGAL_static_assertion_msg (!(boost::is_convertible::value), + static_assert (!(boost::is_convertible::value), "Parallel_tag is enabled but TBB is unavailable."); #else if (boost::is_convertible::value) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/polygon_mesh_to_polygon_soup.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/polygon_mesh_to_polygon_soup.h index d0b22f7b5ef..f247b361f43 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/polygon_mesh_to_polygon_soup.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/polygon_mesh_to_polygon_soup.h @@ -39,7 +39,7 @@ struct PM_to_PS_point_converter { PS_Point operator()(const PM_Point& p) const { - CGAL_static_assertion((std::is_convertible::value)); + static_assert((std::is_convertible::value)); return PS_Point(p); } }; diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/polygon_soup_to_polygon_mesh.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/polygon_soup_to_polygon_mesh.h index bd543f5d390..cc1d299702f 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/polygon_soup_to_polygon_mesh.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/polygon_soup_to_polygon_mesh.h @@ -43,7 +43,7 @@ namespace internal { template PM_Point convert_to_pm_point(const PS_Point& p) { - CGAL_static_assertion((std::is_convertible::value)); + static_assert((std::is_convertible::value)); return PM_Point(p); } @@ -353,10 +353,10 @@ void polygon_soup_to_polygon_mesh(const PointRange& points, choose_parameter(get_parameter(np_ps, internal_np::polygon_to_face_output_iterator), impl::make_functor(get_parameter(np_ps, internal_np::polygon_to_face_map)))); - CGAL_static_assertion_msg( + static_assert( (parameters::is_default_parameter::value), "Named parameter vertex_to_vertex_map was renamed point_to_vertex_map"); - CGAL_static_assertion_msg( + static_assert( (parameters::is_default_parameter::value), "Named parameter face_to_face_map was renamed polygon_to_face_map"); } diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_self_intersections.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_self_intersections.h index 5a922c7cbff..edfdb559bf5 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_self_intersections.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_self_intersections.h @@ -178,7 +178,7 @@ FaceOutputIterator replace_faces_with_patch(const std::vector::value_type, Point>::value)); + static_assert((std::is_same::value_type, Point>::value)); typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/self_intersections.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/self_intersections.h index 3524b46c775..3d085dbb27f 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/self_intersections.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/self_intersections.h @@ -423,7 +423,7 @@ self_intersections_impl(const FaceRange& face_range, Throwing_filter throwing_filter(tmesh, vpmap, gt, Throwing_output_iterator()); #if !defined(CGAL_LINKED_WITH_TBB) - CGAL_static_assertion_msg (!(std::is_convertible::value), + static_assert (!(std::is_convertible::value), "Parallel_tag is enabled but TBB is unavailable."); #else if(std::is_convertible::value) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/smooth_shape.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/smooth_shape.h index bd4e8ad8ab2..5fa0076b537 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/smooth_shape.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/smooth_shape.h @@ -154,11 +154,11 @@ void smooth_shape(const FaceRange& faces, #endif #if defined(CGAL_EIGEN3_ENABLED) - CGAL_static_assertion_msg( + static_assert( (!std::is_same::type, bool>::value) || EIGEN_VERSION_AT_LEAST(3, 2, 0), "Eigen3 version 3.2 or later is required."); #else - CGAL_static_assertion_msg( + static_assert( (!std::is_same::type, bool>::value), "Eigen3 version 3.2 or later is required."); #endif diff --git a/Polygon_mesh_processing/include/CGAL/Rigid_triangle_mesh_collision_detection.h b/Polygon_mesh_processing/include/CGAL/Rigid_triangle_mesh_collision_detection.h index d6cbd420478..3ed4b89f06e 100644 --- a/Polygon_mesh_processing/include/CGAL/Rigid_triangle_mesh_collision_detection.h +++ b/Polygon_mesh_processing/include/CGAL/Rigid_triangle_mesh_collision_detection.h @@ -250,7 +250,7 @@ public: { // handle vpm typedef typename CGAL::GetVertexPointMap::const_type Local_vpm; - CGAL_static_assertion( (std::is_same::value) ); + static_assert( (std::is_same::value) ); Vpm vpm = parameters::choose_parameter(parameters::get_parameter(np, internal_np::vertex_point), @@ -562,7 +562,7 @@ public: parameters::get_parameter(np, internal_np::apply_per_connected_component), true); typedef typename CGAL::GetVertexPointMap::const_type Local_vpm; - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); Vpm vpm = parameters::choose_parameter(parameters::get_parameter(np, internal_np::vertex_point), diff --git a/Polygon_mesh_processing/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Polyhedral_envelope_filter.h b/Polygon_mesh_processing/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Polyhedral_envelope_filter.h index 00bc1225b14..c12178a1b9c 100644 --- a/Polygon_mesh_processing/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Polyhedral_envelope_filter.h +++ b/Polygon_mesh_processing/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Polyhedral_envelope_filter.h @@ -58,7 +58,7 @@ private: template void initialize_envelope(const Profile& profile) const { - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); typedef typename Profile::Triangle_mesh Triangle_mesh; typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_locate.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_locate.cpp index 2767dad9338..8aeaab049db 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_locate.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_locate.cpp @@ -522,7 +522,7 @@ struct Locate_with_AABB_tree_Tester // 2D case typedef CGAL::AABB_face_graph_triangle_primitive AABB_face_graph_primitive; typedef CGAL::AABB_traits AABB_face_graph_traits; - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); Intrinsic_point_to_Point_3 to_p3; @@ -633,7 +633,7 @@ struct Locate_with_AABB_tree_Tester // 3D typedef CGAL::AABB_traits AABB_face_graph_traits; typedef typename K::Point_3 Point_3; - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); CGAL::AABB_tree tree_a; Point_reference p3_a = get(vpm, v); diff --git a/Polyhedron/include/CGAL/Polyhedron_3_to_lcc.h b/Polyhedron/include/CGAL/Polyhedron_3_to_lcc.h index 363ef73cfa2..c284f6e60b1 100644 --- a/Polyhedron/include/CGAL/Polyhedron_3_to_lcc.h +++ b/Polyhedron/include/CGAL/Polyhedron_3_to_lcc.h @@ -30,7 +30,7 @@ namespace CGAL { typename LCC::Dart_descriptor import_from_polyhedron_3(LCC& alcc, const Polyhedron &apoly) { - CGAL_static_assertion( LCC::dimension>=2 && LCC::ambient_dimension==3 ); + static_assert( LCC::dimension>=2 && LCC::ambient_dimension==3 ); typedef typename Polyhedron::Halfedge_const_handle Halfedge_handle; typedef typename Polyhedron::Facet_const_iterator Facet_iterator; diff --git a/Polynomial/include/CGAL/Exponent_vector.h b/Polynomial/include/CGAL/Exponent_vector.h index 72c5e1d8f26..826a9417ffd 100644 --- a/Polynomial/include/CGAL/Exponent_vector.h +++ b/Polynomial/include/CGAL/Exponent_vector.h @@ -59,7 +59,7 @@ public: :v(begin,end){ typedef typename std::iterator_traits::value_type value_type; CGAL_USE_TYPE(value_type); - CGAL_static_assertion(( ::std::is_same::value)); + static_assert(( ::std::is_same::value)); } diff --git a/Polynomial/include/CGAL/Polynomial/Algebraic_structure_traits.h b/Polynomial/include/CGAL/Polynomial/Algebraic_structure_traits.h index b5576f5489c..d75f6f291d5 100644 --- a/Polynomial/include/CGAL/Polynomial/Algebraic_structure_traits.h +++ b/Polynomial/include/CGAL/Polynomial/Algebraic_structure_traits.h @@ -273,7 +273,7 @@ class Polynomial_algebraic_structure_traits_base< POLY, Field_tag > template < class NT1, class NT2 > void operator()( const NT1& x, const NT2& y, POLY& q, POLY& r ) const { - CGAL_static_assertion((::std::is_same< + static_assert((::std::is_same< typename Coercion_traits< NT1, NT2 >::Type, POLY >::value)); diff --git a/Polynomial/include/CGAL/Polynomial/Polynomial_type.h b/Polynomial/include/CGAL/Polynomial/Polynomial_type.h index f1055bedbd0..9c2c27b6fc7 100644 --- a/Polynomial/include/CGAL/Polynomial/Polynomial_type.h +++ b/Polynomial/include/CGAL/Polynomial/Polynomial_type.h @@ -545,7 +545,7 @@ public: * Also available as non-member function. */ CGAL::Sign sign() const { -// CGAL_static_assertion( (std::is_same< typename Real_embeddable_traits::Is_real_embeddable, +// static_assert( (std::is_same< typename Real_embeddable_traits::Is_real_embeddable, // CGAL::Tag_true>::value) ); return CGAL::sign(lcoeff()); } diff --git a/Polynomial/include/CGAL/Polynomial/subresultants.h b/Polynomial/include/CGAL/Polynomial/subresultants.h index 4ea568bf212..e6f4eb40fcd 100644 --- a/Polynomial/include/CGAL/Polynomial/subresultants.h +++ b/Polynomial/include/CGAL/Polynomial/subresultants.h @@ -775,7 +775,7 @@ namespace CGAL { CGAL::Integral_domain_without_division_tag) { // polynomial_subresultants_with_cofactors requires // a model of IntegralDomain as coefficient type; - CGAL_static_assertion(sizeof(Polynomial_traits_d)==0); + static_assert(sizeof(Polynomial_traits_d)==0); return sres_out; } diff --git a/Polynomial/include/CGAL/Polynomial_traits_d.h b/Polynomial/include/CGAL/Polynomial_traits_d.h index 8172dd12395..1a377fc5c17 100644 --- a/Polynomial/include/CGAL/Polynomial_traits_d.h +++ b/Polynomial/include/CGAL/Polynomial_traits_d.h @@ -566,7 +566,7 @@ public: template Polynomial_d construct_value_type(Input_iterator begin, Input_iterator end, NT) const { typedef CGAL::Coercion_traits CT; - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); typename CT::Cast cast; return Polynomial_d( boost::make_transform_iterator(begin,cast), @@ -667,7 +667,7 @@ public: typedef Polynomial_traits_d PT; typename PT::Construct_polynomial construct; - CGAL_static_assertion(PT::d != 0); // Coefficient_type is a Polynomial + static_assert(PT::d != 0); // Coefficient_type is a Polynomial std::vector coefficients; Coefficient_type zero(0); diff --git a/Polynomial/include/CGAL/Test/_test_polynomial_traits_d.h b/Polynomial/include/CGAL/Test/_test_polynomial_traits_d.h index c9097031598..7547bd30281 100644 --- a/Polynomial/include/CGAL/Test/_test_polynomial_traits_d.h +++ b/Polynomial/include/CGAL/Test/_test_polynomial_traits_d.h @@ -50,7 +50,7 @@ static CGAL::Random my_rnd(346); // some seed #define ASSERT_IS_NULL_FUNCTOR(T) \ - CGAL_static_assertion((std::is_same::value)) + static_assert((std::is_same::value)) @@ -178,10 +178,10 @@ void test_construct_polynomial(const Polynomial_traits_d&){ } { // Construct_polynomial typedef typename PT::Construct_polynomial Constructor; - CGAL_static_assertion( + static_assert( !(std::is_same< Constructor , CGAL::Null_functor >::value)); typedef typename Constructor::result_type result_type; - CGAL_static_assertion( + static_assert( (std::is_same< result_type , Polynomial_d >::value)); CGAL_USE_TYPE(result_type); typedef typename PT::Shift Shift; @@ -1802,23 +1802,23 @@ void test_rebind(const PT& /*traits*/){ { typedef typename PT:: template Rebind::Other PT_IC_1; CGAL_USE_TYPE(PT_IC_1); - CGAL_static_assertion((std::is_same< typename PT_IC_1::Innermost_coefficient_type, + static_assert((std::is_same< typename PT_IC_1::Innermost_coefficient_type, IC>::value)); - CGAL_static_assertion((PT_IC_1::d==1)); + static_assert((PT_IC_1::d==1)); } { typedef typename PT:: template Rebind::Other PT_IC_2; CGAL_USE_TYPE(PT_IC_2); - CGAL_static_assertion((std::is_same< typename PT_IC_2::Innermost_coefficient_type, + static_assert((std::is_same< typename PT_IC_2::Innermost_coefficient_type, IC>::value)); - CGAL_static_assertion((PT_IC_2::d==2)); + static_assert((PT_IC_2::d==2)); } { typedef typename PT:: template Rebind::Other PT_IC_3; CGAL_USE_TYPE(PT_IC_3); - CGAL_static_assertion((std::is_same< typename PT_IC_3::Innermost_coefficient_type, + static_assert((std::is_same< typename PT_IC_3::Innermost_coefficient_type, IC>::value)); - CGAL_static_assertion((PT_IC_3::d==3)); + static_assert((PT_IC_3::d==3)); } { typedef typename PT:: template Rebind::Other PT_IC_1; @@ -1831,11 +1831,11 @@ void test_rebind(const PT& /*traits*/){ typedef typename PT_IC_1::Polynomial_d Poly1; typedef typename PT_IC_2::Polynomial_d Poly2; - CGAL_static_assertion((std::is_same< typename PT_IC_1::Coefficient_type, + static_assert((std::is_same< typename PT_IC_1::Coefficient_type, IC>::value)); - CGAL_static_assertion((std::is_same< typename PT_IC_2::Coefficient_type, + static_assert((std::is_same< typename PT_IC_2::Coefficient_type, Poly1>::value)); - CGAL_static_assertion((std::is_same< typename PT_IC_3::Coefficient_type, + static_assert((std::is_same< typename PT_IC_3::Coefficient_type, Poly2>::value)); } @@ -1850,12 +1850,12 @@ void test_rebind(const PT& /*traits*/){ CGAL_USE_TYPE(PT_Integer_4); typedef typename PT:: template Rebind::Other PT_Rational_4; CGAL_USE_TYPE(PT_Rational_4); - CGAL_static_assertion((std::is_same< typename PT_Integer_4::Innermost_coefficient_type, + static_assert((std::is_same< typename PT_Integer_4::Innermost_coefficient_type, Integer>::value)); - CGAL_static_assertion((std::is_same< typename PT_Rational_4::Innermost_coefficient_type, + static_assert((std::is_same< typename PT_Rational_4::Innermost_coefficient_type, Rational>::value)); - CGAL_static_assertion((PT_Integer_4::d==dimension)); - CGAL_static_assertion((PT_Rational_4::d==dimension)); + static_assert((PT_Integer_4::d==dimension)); + static_assert((PT_Rational_4::d==dimension)); } #endif #ifdef CGAL_USE_CORE @@ -1867,12 +1867,12 @@ void test_rebind(const PT& /*traits*/){ typedef typename PT:: template Rebind::Other PT_Rational_4; CGAL_USE_TYPE(PT_Integer_4); CGAL_USE_TYPE(PT_Rational_4); - CGAL_static_assertion((std::is_same< typename PT_Integer_4::Innermost_coefficient_type, + static_assert((std::is_same< typename PT_Integer_4::Innermost_coefficient_type, Integer>::value)); - CGAL_static_assertion((std::is_same< typename PT_Rational_4::Innermost_coefficient_type, + static_assert((std::is_same< typename PT_Rational_4::Innermost_coefficient_type, Rational>::value)); - CGAL_static_assertion((PT_Integer_4::d==4)); - CGAL_static_assertion((PT_Rational_4::d==4)); + static_assert((PT_Integer_4::d==4)); + static_assert((PT_Rational_4::d==4)); } #endif { @@ -1880,12 +1880,12 @@ void test_rebind(const PT& /*traits*/){ typedef typename PT:: template Rebind::Other PT_Rational_4; CGAL_USE_TYPE(PT_Integer_4); CGAL_USE_TYPE(PT_Rational_4); - CGAL_static_assertion((std::is_same< typename PT_Integer_4::Innermost_coefficient_type, + static_assert((std::is_same< typename PT_Integer_4::Innermost_coefficient_type, int>::value)); - CGAL_static_assertion((std::is_same< typename PT_Rational_4::Innermost_coefficient_type, + static_assert((std::is_same< typename PT_Rational_4::Innermost_coefficient_type, double>::value)); - CGAL_static_assertion((PT_Integer_4::d==4)); - CGAL_static_assertion((PT_Rational_4::d==4)); + static_assert((PT_Integer_4::d==4)); + static_assert((PT_Rational_4::d==4)); } } diff --git a/Polynomial/test/Polynomial/Polynomial_type_generator.cpp b/Polynomial/test/Polynomial/Polynomial_type_generator.cpp index d2b0c931512..56e11a39357 100644 --- a/Polynomial/test/Polynomial/Polynomial_type_generator.cpp +++ b/Polynomial/test/Polynomial/Polynomial_type_generator.cpp @@ -12,14 +12,14 @@ int main(){ { typedef CGAL::Polynomial_type_generator::Type Polynomial; - CGAL_static_assertion((::std::is_same::value)); + static_assert((::std::is_same::value)); } { typedef CGAL::Polynomial_type_generator::Type Polynomial; - CGAL_static_assertion((::std::is_same::value)); + static_assert((::std::is_same::value)); } { typedef CGAL::Polynomial_type_generator::Type Polynomial; - CGAL_static_assertion((::std::is_same::value)); + static_assert((::std::is_same::value)); } } diff --git a/Polynomial/test/Polynomial/test_polynomial.h b/Polynomial/test/Polynomial/test_polynomial.h index 5637578e945..7cd7a2e17c2 100644 --- a/Polynomial/test/Polynomial/test_polynomial.h +++ b/Polynomial/test/Polynomial/test_polynomial.h @@ -34,7 +34,7 @@ inline void convert_to(const NT& x, RT& r){ typedef CGAL::Coercion_traits CT; typedef typename CT::Coercion_type RET; - CGAL_static_assertion((::std::is_same::value)); + static_assert((::std::is_same::value)); r = typename CT::Cast()(x); } } //namespace CGAL @@ -887,7 +887,7 @@ void test_scalar_factor_traits(){ typedef CGAL::Scalar_factor_traits SFT; typedef typename AT::Integer Scalar; typedef typename SFT::Scalar Scalar_; - CGAL_static_assertion((::std::is_same::value)); + static_assert((::std::is_same::value)); typename SFT::Scalar_factor sfac; @@ -913,7 +913,7 @@ void test_scalar_factor_traits(){ typedef CGAL::Scalar_factor_traits SFT; typedef typename AT::Integer Scalar; typedef typename SFT::Scalar Scalar_; - CGAL_static_assertion((::std::is_same::value)); + static_assert((::std::is_same::value)); typename SFT::Scalar_factor sfac; diff --git a/Polynomial/test/Polynomial/test_polynomial_Coercion_traits.cpp b/Polynomial/test/Polynomial/test_polynomial_Coercion_traits.cpp index 5760a12eda0..d2ad9d2019c 100644 --- a/Polynomial/test/Polynomial/test_polynomial_Coercion_traits.cpp +++ b/Polynomial/test/Polynomial/test_polynomial_Coercion_traits.cpp @@ -147,7 +147,7 @@ void test_coercion_traits(){ /* { typedef CGAL::Coercion_traits CT; - CGAL_static_assertion(( + static_assert(( ::std::is_same< typename CT::Are_implicit_interoperable, CGAL::Tag_false>::value)); } diff --git a/Polynomial/test/Polynomial/test_polynomial_Get_arithmetic_kernel.cpp b/Polynomial/test/Polynomial/test_polynomial_Get_arithmetic_kernel.cpp index 7107ed8f04e..f52f33ae584 100644 --- a/Polynomial/test/Polynomial/test_polynomial_Get_arithmetic_kernel.cpp +++ b/Polynomial/test/Polynomial/test_polynomial_Get_arithmetic_kernel.cpp @@ -7,11 +7,11 @@ void test_get_arithmetic_kernel(){ { typedef CGAL::Polynomial POLY; typedef typename CGAL::Get_arithmetic_kernel::Arithmetic_kernel AK_; - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); }{ typedef CGAL::Polynomial > POLY; typedef typename CGAL::Get_arithmetic_kernel::Arithmetic_kernel AK_; - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); } } diff --git a/Ridges_3/include/CGAL/Ridges.h b/Ridges_3/include/CGAL/Ridges.h index e09c6eaf571..47fd6019ebd 100644 --- a/Ridges_3/include/CGAL/Ridges.h +++ b/Ridges_3/include/CGAL/Ridges.h @@ -190,10 +190,10 @@ class Ridge_approximation //requirements for the templates TriangleMesh and VertexFTMap or VertexVectorMap - CGAL_static_assertion((std::is_same::value)); - CGAL_static_assertion((std::is_same::value)); - CGAL_static_assertion((std::is_same::value)); - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); + static_assert((std::is_same::value)); + static_assert((std::is_same::value)); + static_assert((std::is_same::value)); typedef std::pair< halfedge_descriptor, FT> Ridge_halfedge; typedef Ridge_halfedge Ridge_halfhedge; // kept for backward compatibility diff --git a/Ridges_3/include/CGAL/Umbilics.h b/Ridges_3/include/CGAL/Umbilics.h index 945fb986ae7..424708b2897 100644 --- a/Ridges_3/include/CGAL/Umbilics.h +++ b/Ridges_3/include/CGAL/Umbilics.h @@ -110,10 +110,10 @@ class Umbilic_approximation typedef typename boost::graph_traits::vertex_iterator Vertex_const_iterator; //requirements for the templates TriangleMesh and VertexFTMap or VertexVectorMap - CGAL_static_assertion((std::is_same::value)); - CGAL_static_assertion((std::is_same::value)); - CGAL_static_assertion((std::is_same::value)); - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); + static_assert((std::is_same::value)); + static_assert((std::is_same::value)); + static_assert((std::is_same::value)); typedef CGAL::Umbilic Umbilic; diff --git a/STL_Extension/include/CGAL/Handle_with_policy.h b/STL_Extension/include/CGAL/Handle_with_policy.h index 004c8b4d96f..978fa9ec1c3 100644 --- a/STL_Extension/include/CGAL/Handle_with_policy.h +++ b/STL_Extension/include/CGAL/Handle_with_policy.h @@ -355,7 +355,7 @@ namespace Intern { typedef ::CGAL::Reference_counted_hierarchy_with_union Reference_counted_hierarchy_with_union; CGAL_USE_TYPE(Reference_counted_hierarchy_with_union); - CGAL_static_assertion(( + static_assert(( ::CGAL::is_same_or_derived< Reference_counted_hierarchy_with_union, T >::value )); } typedef T Rep; @@ -760,7 +760,7 @@ private: static Rep_allocator allocator; static Rep* new_rep( const Rep& rep) { - CGAL_static_assertion( !( + static_assert( !( ::CGAL::is_same_or_derived< Reference_counted_hierarchy_base, Handled_type >::value )); Rep* p = allocator.allocate(1); std::allocator_traits::construct(allocator, p, rep); @@ -855,7 +855,7 @@ protected: //! argument, and the single argument template constructor no other //! constructor will work for class hierarchies of representations. Handle_with_policy( Rep* p) : ptr_( p) { - CGAL_static_assertion(( + static_assert(( ::CGAL::is_same_or_derived< Reference_counted_hierarchy_base, Handled_type >::value )); //Bind bind_; // trigger compile-time check //(void)bind_; @@ -869,7 +869,7 @@ protected: //! version of \c initialize_with is applicable in this case except //! the template version with one argument. void initialize_with( Rep* p) { - CGAL_static_assertion(( + static_assert(( ::CGAL::is_same_or_derived< Reference_counted_hierarchy_base, Handled_type >::value )); //Bind bind_; // trigger compile-time check //(void)bind_; diff --git a/STL_Extension/include/CGAL/Named_function_parameters.h b/STL_Extension/include/CGAL/Named_function_parameters.h index e48768eaffb..4d37486ea4f 100644 --- a/STL_Extension/include/CGAL/Named_function_parameters.h +++ b/STL_Extension/include/CGAL/Named_function_parameters.h @@ -179,7 +179,7 @@ typename Get_param, Query_tag>::type get_parameter_impl(const Named_params_impl& np, Query_tag tag) { #ifndef CGAL_NO_STATIC_ASSERTION_TEST - CGAL_static_assertion( (!std::is_same::value) ); + static_assert( (!std::is_same::value) ); #endif return get_parameter_impl(static_cast(np), tag); } @@ -240,7 +240,7 @@ template typename Get_param, Query_tag>::reference get_parameter_reference_impl(const Named_params_impl& np, Query_tag tag) { - CGAL_static_assertion( (!std::is_same::value) ); + static_assert( (!std::is_same::value) ); return get_parameter_reference_impl(static_cast(np), tag); } @@ -532,7 +532,7 @@ namespace boost template void get_param(CGAL::Named_function_parameters, Tag2) { - CGAL_static_assertion(B && "You must use CGAL::parameters::get_parameter instead of boost::get_param"); + static_assert(B && "You must use CGAL::parameters::get_parameter instead of boost::get_param"); } } #endif diff --git a/STL_Extension/include/CGAL/assertions.h b/STL_Extension/include/CGAL/assertions.h index b64d63a92aa..6db6e93e357 100644 --- a/STL_Extension/include/CGAL/assertions.h +++ b/STL_Extension/include/CGAL/assertions.h @@ -137,12 +137,6 @@ inline bool possibly(Uncertain c); # define CGAL_unreachable() CGAL_assertion(false) # endif // CGAL_UNREACHABLE -# define CGAL_static_assertion(EX) \ - static_assert(EX, #EX) - -# define CGAL_static_assertion_msg(EX,MSG) \ - static_assert(EX, MSG) - #if defined(CGAL_NO_ASSERTIONS) || !defined(CGAL_CHECK_EXACTNESS) # define CGAL_exactness_assertion(EX) (static_cast(0)) # define CGAL_exactness_assertion_msg(EX,MSG) (static_cast(0)) diff --git a/STL_Extension/include/CGAL/for_each.h b/STL_Extension/include/CGAL/for_each.h index f68bba0e80b..69a3e7dcdfe 100644 --- a/STL_Extension/include/CGAL/for_each.h +++ b/STL_Extension/include/CGAL/for_each.h @@ -102,7 +102,7 @@ void for_each (const Range& range, ::reference)>& functor) { #ifndef CGAL_LINKED_WITH_TBB - CGAL_static_assertion_msg (!(boost::is_convertible::value), + static_assert (!(boost::is_convertible::value), "Parallel_tag is enabled but TBB is unavailable."); #endif @@ -118,7 +118,7 @@ void for_each (Range& range, ::reference)>& functor) { #ifndef CGAL_LINKED_WITH_TBB - CGAL_static_assertion_msg (!(boost::is_convertible::value), + static_assert (!(boost::is_convertible::value), "Parallel_tag is enabled but TBB is unavailable."); #endif diff --git a/STL_Extension/include/CGAL/iterator.h b/STL_Extension/include/CGAL/iterator.h index ea9a964c8a3..956cc88a8c2 100644 --- a/STL_Extension/include/CGAL/iterator.h +++ b/STL_Extension/include/CGAL/iterator.h @@ -1340,7 +1340,7 @@ class Dispatch_output_iterator < std::tuple, std::tuple > : private internal::Derivator, std::tuple >, std::tuple, std::tuple > , public std::tuple { - CGAL_static_assertion_msg(sizeof...(V) == sizeof...(O), + static_assert(sizeof...(V) == sizeof...(O), "The number of explicit template parameters has to match the number of arguments"); static const int size = sizeof...(V); diff --git a/STL_Extension/include/CGAL/transforming_pair_iterator.h b/STL_Extension/include/CGAL/transforming_pair_iterator.h index 4e59bb9282a..abc52a584e3 100644 --- a/STL_Extension/include/CGAL/transforming_pair_iterator.h +++ b/STL_Extension/include/CGAL/transforming_pair_iterator.h @@ -25,7 +25,7 @@ namespace CGAL { namespace internal { template ::value> struct Min_category { - CGAL_static_assertion((boost::is_convertible::value)); + static_assert((boost::is_convertible::value)); typedef Cat1 type; }; diff --git a/STL_Extension/test/STL_Extension/test_Cache.cpp b/STL_Extension/test/STL_Extension/test_Cache.cpp index a5c9de6e5a3..609eb6ab829 100644 --- a/STL_Extension/test/STL_Extension/test_Cache.cpp +++ b/STL_Extension/test/STL_Extension/test_Cache.cpp @@ -57,16 +57,16 @@ struct Int_t : public CGAL::Handle_with_policy< Int_rep, Unify > { void test_typedefs(){ typedef CGAL::Cache Cache; CGAL_USE_TYPE(Cache); - CGAL_static_assertion(( ::std::is_same< Cache::Input, int >::value )); - CGAL_static_assertion(( ::std::is_same< Cache::Output,double>::value )); + static_assert(( ::std::is_same< Cache::Input, int >::value )); + static_assert(( ::std::is_same< Cache::Output,double>::value )); typedef CGAL::Creator_1 Creator_double; CGAL_USE_TYPE(Creator_double); - CGAL_static_assertion(( ::std::is_same::value )); + static_assert(( ::std::is_same::value )); typedef CGAL::Creator_1 Creator_int; CGAL_USE_TYPE(Creator_int); - CGAL_static_assertion(( ::std::is_same::value )); - CGAL_static_assertion(( ::std::is_same >::value )); - CGAL_static_assertion(( ::std::is_same >::value )); + static_assert(( ::std::is_same::value )); + static_assert(( ::std::is_same >::value )); + static_assert(( ::std::is_same >::value )); } int main(){ { diff --git a/STL_Extension/test/STL_Extension/test_Compact_container.cpp b/STL_Extension/test/STL_Extension/test_Compact_container.cpp index d2d96cdfc4b..566e15dddc2 100644 --- a/STL_Extension/test/STL_Extension/test_Compact_container.cpp +++ b/STL_Extension/test/STL_Extension/test_Compact_container.cpp @@ -346,7 +346,7 @@ int main() } // Check that Compact_container does not require a complete type. - CGAL_static_assertion(sizeof(CGAL::Compact_container) > 0); + static_assert(sizeof(CGAL::Compact_container) > 0); // Test increment policy CGAL::Compact_container > C5; diff --git a/STL_Extension/test/STL_Extension/test_cgal_named_params.cpp b/STL_Extension/test/STL_Extension/test_cgal_named_params.cpp index 2ae445fbfd5..1f474eebabb 100644 --- a/STL_Extension/test/STL_Extension/test_cgal_named_params.cpp +++ b/STL_Extension/test/STL_Extension/test_cgal_named_params.cpp @@ -24,7 +24,7 @@ template void check_same_type(T) { static const bool b = std::is_same< A, T >::value; - CGAL_static_assertion(b); + static_assert(b); assert(b); } @@ -46,7 +46,7 @@ template void test_no_copyable(const NamedParameters& np) { typedef typename inp::Get_param::type NP_type; - CGAL_static_assertion( (std::is_same >::value) ); + static_assert( (std::is_same >::value) ); const A<4>& a = params::choose_parameter(params::get_parameter_reference(np, inp::edge_index), A<4>(4)); assert(a.v==4); @@ -60,31 +60,31 @@ void test_references(const NamedParameters& np) // std::reference_wrapper typedef typename inp::Lookup_named_param_def::reference Visitor_reference_type; - CGAL_static_assertion( (std::is_same::value) ); + static_assert( (std::is_same::value) ); Visitor_reference_type vis_ref = params::choose_parameter(params::get_parameter_reference(np, inp::visitor), default_value); CGAL_USE(vis_ref); // std::reference_wrapper of const typedef typename inp::Lookup_named_param_def::reference FIM_reference_type; - CGAL_static_assertion( (std::is_same::value) ); + static_assert( (std::is_same::value) ); FIM_reference_type fim_ref = params::choose_parameter(params::get_parameter_reference(np, inp::face_index), default_value); CGAL_USE(fim_ref); // non-copyable typedef typename inp::Lookup_named_param_def::reference VPM_reference_type; - CGAL_static_assertion( (std::is_same::value) ); + static_assert( (std::is_same::value) ); VPM_reference_type vpm_ref = params::choose_parameter(params::get_parameter_reference(np, inp::vertex_point), default_value); CGAL_USE(vpm_ref); // passed by copy typedef typename inp::Lookup_named_param_def::reference VIM_reference_type; - CGAL_static_assertion( (std::is_same, VIM_reference_type>::value) ); + static_assert( (std::is_same, VIM_reference_type>::value) ); VIM_reference_type vim_ref = params::choose_parameter(params::get_parameter_reference(np, inp::vertex_index), default_value); CGAL_USE(vim_ref); // default typedef typename inp::Lookup_named_param_def::reference EIM_reference_type; - CGAL_static_assertion(( std::is_same::value) ); + static_assert(( std::is_same::value) ); EIM_reference_type eim_ref = params::choose_parameter(params::get_parameter_reference(np, inp::edge_index), default_value); assert(&eim_ref==&default_value); } @@ -103,12 +103,12 @@ int main() ); auto d = CGAL::parameters::default_values(); - CGAL_static_assertion( (std::is_same::value) ); + static_assert( (std::is_same::value) ); #ifndef CGAL_NO_DEPRECATED_CODE auto d1 = CGAL::parameters::all_default(); - CGAL_static_assertion( (std::is_same::value) ); + static_assert( (std::is_same::value) ); auto d2 = CGAL::Polygon_mesh_processing::parameters::all_default(); - CGAL_static_assertion( (std::is_same::value) ); + static_assert( (std::is_same::value) ); #endif return EXIT_SUCCESS; diff --git a/STL_Extension/test/STL_Extension/test_is_iterator.cpp b/STL_Extension/test/STL_Extension/test_is_iterator.cpp index 7305fe62da0..d1c3b157aaa 100644 --- a/STL_Extension/test/STL_Extension/test_is_iterator.cpp +++ b/STL_Extension/test/STL_Extension/test_is_iterator.cpp @@ -17,17 +17,17 @@ int main() { CGAL_USE_TYPE(vector_it); CGAL_USE_TYPE(list_it); CGAL_USE_TYPE(int_p); - CGAL_static_assertion(is_iterator::value); - CGAL_static_assertion(is_iterator::value); - CGAL_static_assertion(!is_iterator::value); - CGAL_static_assertion(!is_iterator::value); - CGAL_static_assertion(is_iterator::value); + static_assert(is_iterator::value); + static_assert(is_iterator::value); + static_assert(!is_iterator::value); + static_assert(!is_iterator::value); + static_assert(is_iterator::value); - CGAL_static_assertion((is_iterator_type::value)); - CGAL_static_assertion((!is_iterator_type::value)); - CGAL_static_assertion((!is_iterator_type::value)); + static_assert((is_iterator_type::value)); + static_assert((!is_iterator_type::value)); + static_assert((!is_iterator_type::value)); - CGAL_static_assertion((is_iterator_to::value)); - CGAL_static_assertion((!is_iterator_to::value)); - CGAL_static_assertion((!is_iterator_to::value)); + static_assert((is_iterator_to::value)); + static_assert((!is_iterator_to::value)); + static_assert((!is_iterator_to::value)); } diff --git a/STL_Extension/test/STL_Extension/test_is_streamable.cpp b/STL_Extension/test/STL_Extension/test_is_streamable.cpp index 7d1c81a892c..6e574cfdec1 100644 --- a/STL_Extension/test/STL_Extension/test_is_streamable.cpp +++ b/STL_Extension/test/STL_Extension/test_is_streamable.cpp @@ -21,12 +21,12 @@ istream& operator>>(istream& is, const D&) { return is; } int main() { using CGAL::is_streamable; - CGAL_static_assertion(!is_streamable::value); - CGAL_static_assertion(is_streamable::value); - CGAL_static_assertion(!is_streamable::value); - CGAL_static_assertion(!is_streamable::value); - CGAL_static_assertion(is_streamable::value); - CGAL_static_assertion(is_streamable::value); - CGAL_static_assertion(! (is_streamable >::value) ); - CGAL_static_assertion( (is_streamable >::value) ); + static_assert(!is_streamable::value); + static_assert(is_streamable::value); + static_assert(!is_streamable::value); + static_assert(!is_streamable::value); + static_assert(is_streamable::value); + static_assert(is_streamable::value); + static_assert(! (is_streamable >::value) ); + static_assert( (is_streamable >::value) ); } diff --git a/STL_Extension/test/STL_Extension/test_stl_extension.cpp b/STL_Extension/test/STL_Extension/test_stl_extension.cpp index d361ed8b610..1895935f787 100644 --- a/STL_Extension/test/STL_Extension/test_stl_extension.cpp +++ b/STL_Extension/test/STL_Extension/test_stl_extension.cpp @@ -8117,10 +8117,10 @@ void test_tuple(){ CGAL_USE_TYPE(T0); CGAL_USE_TYPE(T2); - CGAL_static_assertion( std::tuple_size::value == 0 ); - CGAL_static_assertion( std::tuple_size::value == 2 ); - CGAL_static_assertion( std::tuple_size::value == 4 ); - CGAL_static_assertion( (std::is_same::type,My_to_int>::value) ); + static_assert( std::tuple_size::value == 0 ); + static_assert( std::tuple_size::value == 2 ); + static_assert( std::tuple_size::value == 4 ); + static_assert( (std::is_same::type,My_to_int>::value) ); T1 t1=std::make_tuple(1,2); T1 t1_2=std::make_tuple(1,2); @@ -8206,15 +8206,15 @@ void test_make_sorted_pair() { assert(p3==p4); int i=2; assert( CGAL::make_sorted_pair(1,i) == std::make_pair(1,i) ); - CGAL_static_assertion( (std::is_same< + static_assert( (std::is_same< BOOST_TYPEOF(CGAL::make_sorted_pair(1L,i)), std::pair >::value) ); assert( (CGAL::make_sorted_pair(i,1L) == std::pair(1L,2L)) ); - CGAL_static_assertion( (std::is_same< + static_assert( (std::is_same< BOOST_TYPEOF(CGAL::make_sorted_pair(1,2L)), std::pair >::value) ); - CGAL_static_assertion( (std::is_same< + static_assert( (std::is_same< BOOST_TYPEOF(CGAL::make_sorted_pair(1,2L)), std::pair >::value) ); } @@ -8237,8 +8237,8 @@ void test_result_of() { typedef CGAL::cpp11::result_of::type result_type_float; CGAL_USE_TYPE(result_type); CGAL_USE_TYPE(result_type_float); - CGAL_static_assertion((std::is_same::value)); - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); + static_assert((std::is_same::value)); } diff --git a/Scale_space_reconstruction_3/include/CGAL/Scale_space_reconstruction_3/Weighted_PCA_smoother.h b/Scale_space_reconstruction_3/include/CGAL/Scale_space_reconstruction_3/Weighted_PCA_smoother.h index bc4ba9ec616..a32aacd681b 100644 --- a/Scale_space_reconstruction_3/include/CGAL/Scale_space_reconstruction_3/Weighted_PCA_smoother.h +++ b/Scale_space_reconstruction_3/include/CGAL/Scale_space_reconstruction_3/Weighted_PCA_smoother.h @@ -198,7 +198,7 @@ private: void try_parallel (const F& func, std::size_t begin, std::size_t end) { #ifndef CGAL_LINKED_WITH_TBB - CGAL_static_assertion_msg (!(boost::is_convertible::value), + static_assert (!(boost::is_convertible::value), "Parallel_tag is enabled but TBB is unavailable."); #else if (boost::is_convertible::value) diff --git a/Shape_regularization/include/CGAL/Shape_regularization/regularize_planes.h b/Shape_regularization/include/CGAL/Shape_regularization/regularize_planes.h index 94713899f34..a5a5c5e58cb 100644 --- a/Shape_regularization/include/CGAL/Shape_regularization/regularize_planes.h +++ b/Shape_regularization/include/CGAL/Shape_regularization/regularize_planes.h @@ -296,7 +296,7 @@ namespace Planes { using PlaneIndexMap = typename CGAL::Point_set_processing_3::GetPlaneIndexMap::type; - CGAL_static_assertion_msg((!is_default_parameter::value), + static_assert((!is_default_parameter::value), "Error: no plane index map"); const PlaneIndexMap index_map = diff --git a/Snap_rounding_2/include/CGAL/Snap_rounding_kd_2.h b/Snap_rounding_2/include/CGAL/Snap_rounding_kd_2.h index add923b15e2..ff11623a892 100644 --- a/Snap_rounding_2/include/CGAL/Snap_rounding_kd_2.h +++ b/Snap_rounding_2/include/CGAL/Snap_rounding_kd_2.h @@ -107,7 +107,7 @@ public: template class Multiple_kd_tree { - CGAL_static_assertion_msg((boost::is_pointer::value), "SAVED_OBJECT is not a pointer."); + static_assert((boost::is_pointer::value), "SAVED_OBJECT is not a pointer."); private: typedef Traits_ Traits; typedef typename Traits::FT NT; diff --git a/Spatial_searching/include/CGAL/Kd_tree.h b/Spatial_searching/include/CGAL/Kd_tree.h index b0958bc44ee..317f6a78bad 100644 --- a/Spatial_searching/include/CGAL/Kd_tree.h +++ b/Spatial_searching/include/CGAL/Kd_tree.h @@ -335,7 +335,7 @@ public: } #ifndef CGAL_TBB_STRUCTURE_IN_KD_TREE - CGAL_static_assertion_msg (!(boost::is_convertible::value), + static_assert (!(boost::is_convertible::value), "Parallel_tag is enabled but TBB is unavailable."); #endif diff --git a/Spatial_sorting/include/CGAL/Hilbert_sort_median_2.h b/Spatial_sorting/include/CGAL/Hilbert_sort_median_2.h index 722ccc3acbc..59df305b5c4 100644 --- a/Spatial_sorting/include/CGAL/Hilbert_sort_median_2.h +++ b/Spatial_sorting/include/CGAL/Hilbert_sort_median_2.h @@ -157,7 +157,7 @@ public: #ifndef CGAL_LINKED_WITH_TBB CGAL_USE(begin); CGAL_USE(end); - CGAL_static_assertion_msg (!(boost::is_convertible::value), + static_assert (!(boost::is_convertible::value), "Parallel_tag is enabled but TBB is unavailable."); #else const int y = (x + 1) % 2; diff --git a/Spatial_sorting/include/CGAL/Hilbert_sort_median_3.h b/Spatial_sorting/include/CGAL/Hilbert_sort_median_3.h index ebf71afed5a..6fc128cd61a 100644 --- a/Spatial_sorting/include/CGAL/Hilbert_sort_median_3.h +++ b/Spatial_sorting/include/CGAL/Hilbert_sort_median_3.h @@ -180,7 +180,7 @@ public: #ifndef CGAL_LINKED_WITH_TBB CGAL_USE(begin); CGAL_USE(end); - CGAL_static_assertion_msg (!(boost::is_convertible::value), + static_assert (!(boost::is_convertible::value), "Parallel_tag is enabled but TBB is unavailable."); #else const int y = (x + 1) % 3, z = (x + 2) % 3; diff --git a/Stream_support/test/Stream_support/test_ioformat.cpp b/Stream_support/test/Stream_support/test_ioformat.cpp index e4e4e13e67e..d85c7c0577c 100644 --- a/Stream_support/test/Stream_support/test_ioformat.cpp +++ b/Stream_support/test/Stream_support/test_ioformat.cpp @@ -50,8 +50,8 @@ void test_io(const NT& x){ } int main() { - CGAL_static_assertion(CGAL::Output_rep::is_specialized == false); - CGAL_static_assertion(CGAL::Input_rep::is_specialized == false); + static_assert(CGAL::Output_rep::is_specialized == false); + static_assert(CGAL::Input_rep::is_specialized == false); std::cout << "test_io: short "<< std::endl; test_io(12); diff --git a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/ARAP_parameterizer_3.h b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/ARAP_parameterizer_3.h index ca3de476091..763ed9ac09b 100644 --- a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/ARAP_parameterizer_3.h +++ b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/ARAP_parameterizer_3.h @@ -176,7 +176,7 @@ public: Two_vertices_parameterizer_3 >::type Border_parameterizer; #if !defined(CGAL_EIGEN3_ENABLED) - CGAL_static_assertion_msg(!(std::is_same::value), + static_assert(!(std::is_same::value), "Error: You must either provide 'SolverTraits_' or link CGAL with the Eigen library"); #endif diff --git a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Fixed_border_parameterizer_3.h b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Fixed_border_parameterizer_3.h index 3bf9f7f8f91..a128e341a7b 100644 --- a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Fixed_border_parameterizer_3.h +++ b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Fixed_border_parameterizer_3.h @@ -104,7 +104,7 @@ public: Circular_border_arc_length_parameterizer_3 >::type Border_parameterizer; #if !defined(CGAL_EIGEN3_ENABLED) - CGAL_static_assertion_msg(!(std::is_same::value), + static_assert(!(std::is_same::value), "Error: You must either provide 'SolverTraits_' or link CGAL with the Eigen library"); #endif diff --git a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Orbifold_Tutte_parameterizer_3.h b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Orbifold_Tutte_parameterizer_3.h index c23ce5bf15d..2f629c9cb64 100644 --- a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Orbifold_Tutte_parameterizer_3.h +++ b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Orbifold_Tutte_parameterizer_3.h @@ -384,7 +384,7 @@ class Orbifold_Tutte_parameterizer_3 public: #ifndef DOXYGEN_RUNNING #if !defined(CGAL_EIGEN3_ENABLED) - CGAL_static_assertion_msg(!(std::is_same::value), + static_assert(!(std::is_same::value), "Error: You must either provide 'SolverTraits_' or link CGAL with the Eigen library"); #endif diff --git a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Bounded_distance_placement.h b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Bounded_distance_placement.h index 59a33fa465c..36f2f855312 100644 --- a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Bounded_distance_placement.h +++ b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Bounded_distance_placement.h @@ -49,7 +49,7 @@ private: template void initialize_tree(const Profile& profile) const { - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); typedef typename Profile::Triangle_mesh Triangle_mesh; typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; diff --git a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/FastEnvelope_filter.h b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/FastEnvelope_filter.h index 28b22b3e079..2f0abb38789 100644 --- a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/FastEnvelope_filter.h +++ b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/FastEnvelope_filter.h @@ -43,7 +43,7 @@ private: template void initialize_envelope(const Profile& profile) const { - CGAL_static_assertion((std::is_same::value)); + static_assert((std::is_same::value)); typedef typename Profile::Triangle_mesh Triangle_mesh; typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; diff --git a/Surface_mesher/include/CGAL/Surface_mesher/Combining_oracle.h b/Surface_mesher/include/CGAL/Surface_mesher/Combining_oracle.h index 46c1a253cc4..1340c1700e3 100644 --- a/Surface_mesher/include/CGAL/Surface_mesher/Combining_oracle.h +++ b/Surface_mesher/include/CGAL/Surface_mesher/Combining_oracle.h @@ -51,7 +51,7 @@ namespace CGAL { typedef typename Oracle_a::Intersection_point Intersection_point; - CGAL_static_assertion((::std::is_same< + static_assert((::std::is_same< Intersection_point, typename Oracle_b::Intersection_point>::value)); diff --git a/Surface_sweep_2/include/CGAL/No_intersection_surface_sweep_2.h b/Surface_sweep_2/include/CGAL/No_intersection_surface_sweep_2.h index 21aa9eaa8c7..8730089384e 100644 --- a/Surface_sweep_2/include/CGAL/No_intersection_surface_sweep_2.h +++ b/Surface_sweep_2/include/CGAL/No_intersection_surface_sweep_2.h @@ -129,7 +129,7 @@ public: typedef typename Traits_adaptor_2::Top_side_category Top_side_category; typedef typename Traits_adaptor_2::Right_side_category Right_side_category; - CGAL_static_assertion((Arr_sane_identified_tagging< Left_side_category, Bottom_side_category, + static_assert((Arr_sane_identified_tagging< Left_side_category, Bottom_side_category, Top_side_category, Right_side_category >::value)); protected: diff --git a/TDS_3/include/CGAL/Triangulation_data_structure_3.h b/TDS_3/include/CGAL/Triangulation_data_structure_3.h index 6333387f28b..862ffc71194 100644 --- a/TDS_3/include/CGAL/Triangulation_data_structure_3.h +++ b/TDS_3/include/CGAL/Triangulation_data_structure_3.h @@ -130,7 +130,7 @@ public: >::type Cell_range; # else - CGAL_static_assertion_msg + static_assert (!(std::is_convertible::value), "In CGAL triangulations, `Parallel_tag` can only be used with the Intel TBB library. " "Make TBB available in the build system and then define the macro `CGAL_LINKED_WITH_TBB`."); diff --git a/Triangulation_2/include/CGAL/Triangulation_2_to_lcc.h b/Triangulation_2/include/CGAL/Triangulation_2_to_lcc.h index 41a72c1e9de..86d9a71f51e 100644 --- a/Triangulation_2/include/CGAL/Triangulation_2_to_lcc.h +++ b/Triangulation_2/include/CGAL/Triangulation_2_to_lcc.h @@ -31,7 +31,7 @@ namespace CGAL { std::map* aface_to_dart=nullptr) { - CGAL_static_assertion( LCC::dimension>=2 && LCC::ambient_dimension==2 ); + static_assert( LCC::dimension>=2 && LCC::ambient_dimension==2 ); // Case of empty triangulations. if (atr.number_of_vertices()==0) return LCC::null_descriptor; diff --git a/Triangulation_3/include/CGAL/Triangulation_3_to_lcc.h b/Triangulation_3/include/CGAL/Triangulation_3_to_lcc.h index 01a5dbb8535..14f718f0b13 100644 --- a/Triangulation_3/include/CGAL/Triangulation_3_to_lcc.h +++ b/Triangulation_3/include/CGAL/Triangulation_3_to_lcc.h @@ -49,7 +49,7 @@ namespace CGAL { std::map* avol_to_dart=nullptr) { - CGAL_static_assertion( LCC::dimension>=3 && LCC::ambient_dimension==3 ); + static_assert( LCC::dimension>=3 && LCC::ambient_dimension==3 ); // Case of empty triangulations. if (atr.number_of_vertices() == 0) return LCC::null_descriptor; diff --git a/Triangulation_on_sphere_2/include/CGAL/Delaunay_triangulation_on_sphere_2.h b/Triangulation_on_sphere_2/include/CGAL/Delaunay_triangulation_on_sphere_2.h index a447bc7e335..ab3fe40ec6c 100644 --- a/Triangulation_on_sphere_2/include/CGAL/Delaunay_triangulation_on_sphere_2.h +++ b/Triangulation_on_sphere_2/include/CGAL/Delaunay_triangulation_on_sphere_2.h @@ -632,8 +632,8 @@ insert(InputIterator first, InputIterator beyond, { typedef Point_3_with_iterator P3_wit; - CGAL_static_assertion((std::is_same::value_type, Point>::value)); - CGAL_static_assertion(!(std::is_same::value)); + static_assert((std::is_same::value_type, Point>::value)); + static_assert(!(std::is_same::value)); const size_type n = number_of_vertices(); diff --git a/Triangulation_on_sphere_2/include/CGAL/Triangulation_on_sphere_2/internal/arc_on_sphere_2_subsampling.h b/Triangulation_on_sphere_2/include/CGAL/Triangulation_on_sphere_2/internal/arc_on_sphere_2_subsampling.h index fbe52979939..98dc2f54c65 100644 --- a/Triangulation_on_sphere_2/include/CGAL/Triangulation_on_sphere_2/internal/arc_on_sphere_2_subsampling.h +++ b/Triangulation_on_sphere_2/include/CGAL/Triangulation_on_sphere_2/internal/arc_on_sphere_2_subsampling.h @@ -56,7 +56,7 @@ double get_theta(typename Kernel::Point_3& pt, #endif >::type Col; - CGAL_static_assertion_msg(!(std::is_same::value), + static_assert(!(std::is_same::value), "Eigen is required to perform arc subsampling!"); auto V1c = V1.cartesian_begin(), V2c = V2.cartesian_begin(), V3c = V3.cartesian_begin(); From f5803d5a8b0fa4b6796e26b82c918d3f6b9118cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Fri, 28 Apr 2023 23:00:44 +0200 Subject: [PATCH 14/22] MSVC 2015 is no longer supported --- Documentation/doc/Documentation/Third_party.txt | 2 +- Documentation/doc/Documentation/windows.txt | 2 +- Installation/CHANGES.md | 11 +++++++++++ .../cmake/modules/CGAL_SetupCGALDependencies.cmake | 5 ----- 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/Documentation/doc/Documentation/Third_party.txt b/Documentation/doc/Documentation/Third_party.txt index 1e3fe07e9ba..eac22ad8292 100644 --- a/Documentation/doc/Documentation/Third_party.txt +++ b/Documentation/doc/Documentation/Third_party.txt @@ -14,7 +14,7 @@ supporting C++14 or later. | Linux | \gnu `g++` 10.2.1 or later\cgalFootnote{\cgalFootnoteCode{https://gcc.gnu.org/}} | | | `Clang` \cgalFootnote{\cgalFootnoteCode{https://clang.llvm.org/}} compiler version 13.0.1 | | \ms Windows | \gnu `g++` 10.2.1 or later\cgalFootnote{\cgalFootnoteCode{https://gcc.gnu.org/}} | -| | \ms Visual `C++` 14.0, 15.9, 16.10, 17.0 (\visualstudio 2015, 2017, 2019, and 2022)\cgalFootnote{\cgalFootnoteCode{https://visualstudio.microsoft.com/}} | +| | \ms Visual `C++` 15.9, 16.10, 17.0 (\visualstudio 2017, 2019, and 2022)\cgalFootnote{\cgalFootnoteCode{https://visualstudio.microsoft.com/}} | | MacOS X | \gnu `g++` 10.2.1 or later\cgalFootnote{\cgalFootnoteCode{https://gcc.gnu.org/}} | | | Apple `Clang` compiler versions 10.0.1, 12.0.5, and 13.0.0 | diff --git a/Documentation/doc/Documentation/windows.txt b/Documentation/doc/Documentation/windows.txt index c4daa8fc380..d40059d76cd 100644 --- a/Documentation/doc/Documentation/windows.txt +++ b/Documentation/doc/Documentation/windows.txt @@ -3,7 +3,7 @@ \cgalAutoToc \cgal \cgalReleaseNumber is supported for the following \ms Visual `C++` compilers: -14.0, 15.9, 16.0, 17.0 (\visualstudio 2015, 2017, 2019, and 2022). +15.9, 16.0, 17.0 (\visualstudio 2017, 2019, and 2022). \cgal is a library that has mandatory dependencies that must be first installed: \ref thirdpartyBoost and \ref thirdpartyMPFR. diff --git a/Installation/CHANGES.md b/Installation/CHANGES.md index c4ce7a51d6d..a505215bd00 100644 --- a/Installation/CHANGES.md +++ b/Installation/CHANGES.md @@ -1,6 +1,17 @@ Release History =============== +[Release 6.0](https://github.com/CGAL/cgal/releases/tag/v6.0) +----------- + +Release date: October 2023 + +### General Changes + +- **Breaking change**: C++17 is now required +- Support for Visual `C++` 14.0 (Visual studio 2015) is dropped. + + [Release 5.6](https://github.com/CGAL/cgal/releases/tag/v5.6) ----------- diff --git a/Installation/cmake/modules/CGAL_SetupCGALDependencies.cmake b/Installation/cmake/modules/CGAL_SetupCGALDependencies.cmake index de0f5eb7fa4..3664c4b0693 100644 --- a/Installation/cmake/modules/CGAL_SetupCGALDependencies.cmake +++ b/Installation/cmake/modules/CGAL_SetupCGALDependencies.cmake @@ -127,11 +127,6 @@ function(CGAL_setup_CGAL_dependencies target) $<$:/fp:except-> $<$:/bigobj> # Use /bigobj by default ) - if(MSVC_TOOLSET_VERSION VERSION_LESS_EQUAL 140) # for MSVC 2015 - target_compile_options(${target} INTERFACE - $<$:/wd4503> # Suppress warnings C4503 about "decorated name length exceeded" - ) - endif() elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "AppleClang") if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 11.0.3) message(STATUS "Apple Clang version ${CMAKE_CXX_COMPILER_VERSION} compiler detected") From cc1cb02ccd147642ddf8cc3530f3fc587eb7681a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Fri, 28 Apr 2023 23:08:22 +0200 Subject: [PATCH 15/22] missing 6.0 updates --- Documentation/doc/resources/1.8.13/menu_version.js | 3 ++- Documentation/doc/resources/1.8.14/menu_version.js | 3 ++- Documentation/doc/resources/1.8.20/menu_version.js | 3 ++- Documentation/doc/resources/1.8.4/menu_version.js | 3 ++- Documentation/doc/resources/1.9.3/menu_version.js | 3 ++- Installation/lib/cmake/CGAL/CGALConfigVersion.cmake | 6 +++--- 6 files changed, 13 insertions(+), 8 deletions(-) diff --git a/Documentation/doc/resources/1.8.13/menu_version.js b/Documentation/doc/resources/1.8.13/menu_version.js index a66903b10fe..f3b20c2fe00 100644 --- a/Documentation/doc/resources/1.8.13/menu_version.js +++ b/Documentation/doc/resources/1.8.13/menu_version.js @@ -6,7 +6,8 @@ var current_version_local = 'master' var all_versions = [ 'master', - '5.6-beta1', + '6.0-beta1', + '5.6', 'latest', '5.5.2', '5.4.4', diff --git a/Documentation/doc/resources/1.8.14/menu_version.js b/Documentation/doc/resources/1.8.14/menu_version.js index a66903b10fe..f3b20c2fe00 100644 --- a/Documentation/doc/resources/1.8.14/menu_version.js +++ b/Documentation/doc/resources/1.8.14/menu_version.js @@ -6,7 +6,8 @@ var current_version_local = 'master' var all_versions = [ 'master', - '5.6-beta1', + '6.0-beta1', + '5.6', 'latest', '5.5.2', '5.4.4', diff --git a/Documentation/doc/resources/1.8.20/menu_version.js b/Documentation/doc/resources/1.8.20/menu_version.js index a66903b10fe..f3b20c2fe00 100644 --- a/Documentation/doc/resources/1.8.20/menu_version.js +++ b/Documentation/doc/resources/1.8.20/menu_version.js @@ -6,7 +6,8 @@ var current_version_local = 'master' var all_versions = [ 'master', - '5.6-beta1', + '6.0-beta1', + '5.6', 'latest', '5.5.2', '5.4.4', diff --git a/Documentation/doc/resources/1.8.4/menu_version.js b/Documentation/doc/resources/1.8.4/menu_version.js index a66903b10fe..f3b20c2fe00 100644 --- a/Documentation/doc/resources/1.8.4/menu_version.js +++ b/Documentation/doc/resources/1.8.4/menu_version.js @@ -6,7 +6,8 @@ var current_version_local = 'master' var all_versions = [ 'master', - '5.6-beta1', + '6.0-beta1', + '5.6', 'latest', '5.5.2', '5.4.4', diff --git a/Documentation/doc/resources/1.9.3/menu_version.js b/Documentation/doc/resources/1.9.3/menu_version.js index a66903b10fe..f3b20c2fe00 100644 --- a/Documentation/doc/resources/1.9.3/menu_version.js +++ b/Documentation/doc/resources/1.9.3/menu_version.js @@ -6,7 +6,8 @@ var current_version_local = 'master' var all_versions = [ 'master', - '5.6-beta1', + '6.0-beta1', + '5.6', 'latest', '5.5.2', '5.4.4', diff --git a/Installation/lib/cmake/CGAL/CGALConfigVersion.cmake b/Installation/lib/cmake/CGAL/CGALConfigVersion.cmake index e71784c4c52..fc443126c18 100644 --- a/Installation/lib/cmake/CGAL/CGALConfigVersion.cmake +++ b/Installation/lib/cmake/CGAL/CGALConfigVersion.cmake @@ -1,8 +1,8 @@ -set(CGAL_MAJOR_VERSION 5) -set(CGAL_MINOR_VERSION 6) +set(CGAL_MAJOR_VERSION 6) +set(CGAL_MINOR_VERSION 0) set(CGAL_BUGFIX_VERSION 0) include(${CMAKE_CURRENT_LIST_DIR}/CGALConfigBuildVersion.cmake) -set(CGAL_VERSION_PUBLIC_RELEASE_VERSION "5.6-beta1") +set(CGAL_VERSION_PUBLIC_RELEASE_VERSION "6.0-beta1") set(CGAL_VERSION_PUBLIC_RELEASE_NAME "CGAL-${CGAL_VERSION_PUBLIC_RELEASE_VERSION}") if (CGAL_BUGFIX_VERSION AND CGAL_BUGFIX_VERSION GREATER 0) From 6df9a0d61cc91a1c3fa19328f4260b0edf4caffa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Wed, 3 May 2023 19:04:30 +0200 Subject: [PATCH 16/22] check headers also needs c++17 --- Installation/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Installation/CMakeLists.txt b/Installation/CMakeLists.txt index 0a521d9dd2c..e06916bd1a3 100644 --- a/Installation/CMakeLists.txt +++ b/Installation/CMakeLists.txt @@ -943,7 +943,7 @@ ${Qt5Widgets_DEFINITIONS} ${Qt5OpenGL_DEFINITIONS} ${Qt5Gui_DEFINITIONS} \ ${Qt5OpenGL_EXECUTABLE_COMPILE_FLAGS} -fPIC \ ${Qt5Gui_EXECUTABLE_COMPILE_FLAGS} \ ${CGAL_3RD_PARTY_DEFINITIONS} ${CGAL_Qt5_3RD_PARTY_DEFINITIONS} \ -${CGAL_DEFINITIONS}") +${CGAL_DEFINITIONS} -std=c++17") message("COMPILATION OPTIONS ARE : ${compile_options}") if(NOT RS_FOUND AND NOT RS3_FOUND) From b45b2c379faaee13a4457ab26c5349541df8a8bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Wed, 3 May 2023 18:59:54 +0200 Subject: [PATCH 17/22] update doc about C++ standard --- Documentation/doc/Documentation/Preliminaries.txt | 5 ++--- Documentation/doc/Documentation/Third_party.txt | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Documentation/doc/Documentation/Preliminaries.txt b/Documentation/doc/Documentation/Preliminaries.txt index 1fccdc134f9..c8a06bd7d17 100644 --- a/Documentation/doc/Documentation/Preliminaries.txt +++ b/Documentation/doc/Documentation/Preliminaries.txt @@ -39,10 +39,9 @@ If you are using CMake, then you can set the CMake option `CGAL_HAS_NO_THREADS` `TRUE`. In addition to defining the preprocessor macro `CGAL_HAS_NO_THREADS`, it will also avoid CMake to link with the native threads support library on your system. -\section Preliminaries_cc0x C++14 Support +\section Preliminaries_cc0x C++17 Support -After being based on the \CC standard released in 1998 (and later refined in 2003) for a long time, -\cgal is now based on a newer major version of the standard, C++14. +\cgal is based on a the version C++17 of the standard. \section preliminaries_secchecks Checks diff --git a/Documentation/doc/Documentation/Third_party.txt b/Documentation/doc/Documentation/Third_party.txt index eac22ad8292..9017a5eee91 100644 --- a/Documentation/doc/Documentation/Third_party.txt +++ b/Documentation/doc/Documentation/Third_party.txt @@ -6,7 +6,7 @@ \section seccompilers Supported Compilers In order to build a program using \cgal, you need a \cpp compiler -supporting C++14 or later. +supporting C++17 or later. \cgal \cgalReleaseNumber is supported (continuously tested) for the following compilers/operating systems: | Operating System | Compiler | From 5b0786aa9942b5266c219f2cda0763d74ed4cadd Mon Sep 17 00:00:00 2001 From: Sebastien Loriot Date: Wed, 7 Jun 2023 17:21:30 +0200 Subject: [PATCH 18/22] Update Documentation/doc/Documentation/Preliminaries.txt Co-authored-by: Laurent Rineau --- Documentation/doc/Documentation/Preliminaries.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/doc/Documentation/Preliminaries.txt b/Documentation/doc/Documentation/Preliminaries.txt index c8a06bd7d17..2e2ae95e661 100644 --- a/Documentation/doc/Documentation/Preliminaries.txt +++ b/Documentation/doc/Documentation/Preliminaries.txt @@ -41,7 +41,7 @@ also avoid CMake to link with the native threads support library on your system. \section Preliminaries_cc0x C++17 Support -\cgal is based on a the version C++17 of the standard. +\cgal is based on the version C++17 of the C++ standard. \section preliminaries_secchecks Checks From 2bab43861e74d4517e05ec2c0b7ba697ad004509 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Fri, 16 Jun 2023 10:10:15 +0200 Subject: [PATCH 19/22] Update precompiled demos script --- Maintenance/public_release/scripts/precompiled_demos_zips | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Maintenance/public_release/scripts/precompiled_demos_zips b/Maintenance/public_release/scripts/precompiled_demos_zips index 654f4216393..d54c4167d56 100755 --- a/Maintenance/public_release/scripts/precompiled_demos_zips +++ b/Maintenance/public_release/scripts/precompiled_demos_zips @@ -64,12 +64,16 @@ pushd Segment_Delaunay_graph_Linf_2_Demo_with_dlls; zip -r ../segment_voronoi_di # CGAL-4.8 pushd Optimal_transportation_reconstruction_2_Demo_with_dlls; zip -r ../otr2.zip *; popd + #missing demos pushd Polygon_Demo_with_dlls; zip -r ../polygon.zip *; popd pushd Principal_component_analysis_Demo_with_dlls; zip -r ../pca.zip *; popd pushd Hyperbolic_triangulation_2_Demo_with_dlls; zip -r ../Hyperbolic_Delaunay_triangulation_2.zip *; popd pushd Periodic_4_hyperbolic_triangulation_2_Demo_with_dlls; zip -r ../Periodic_4_hyperbolic_Delaunay_triangulation_2.zip *; popd +# CGAL-5.3 +pushd Triangulation_on_sphere_2_Demo_with_dlls; zip -r ../triangulation_on_sphere_2.zip *; popd + # check echo CHECK now. The following lines should be empty. for f in *zip; do unzip -qql $f; done | awk '{print $4}' >| done From 0ee31a5d4fd8b3290351902baeca75829a869cad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Mon, 19 Jun 2023 19:17:49 +0200 Subject: [PATCH 20/22] remove extra parenthesis --- .../internal/AABB_ray_intersection.h | 2 +- .../Algebraic_foundations/fraction_traits.cpp | 4 +- .../Algebraic_foundations/interoperable.cpp | 2 +- .../include/CGAL/Algebraic_structure_traits.h | 3 +- .../include/CGAL/Coercion_traits.h | 4 +- .../include/CGAL/Scalar_factor_traits.h | 4 +- .../CGAL/Test/_test_algebraic_structure.h | 45 ++++++------ .../include/CGAL/Test/_test_coercion_traits.h | 6 +- .../include/CGAL/Test/_test_fraction_traits.h | 10 +-- .../include/CGAL/Test/_test_rational_traits.h | 2 +- .../include/CGAL/Test/_test_real_embeddable.h | 16 ++--- .../Algebraic_extension_traits.cpp | 20 +++--- .../Algebraic_structure_traits.cpp | 6 +- .../Algebraic_foundations/Coercion_traits.cpp | 19 ++---- .../Real_embeddable_traits.cpp | 4 +- .../Scalar_factor_traits.cpp | 16 ++--- .../Algebraic_curve_kernel_2.h | 24 +++---- .../algebraic_curve_kernel_2_tools.h | 8 +-- .../Real_embeddable_traits_extension.cpp | 16 ++--- .../CGAL/_test_algebraic_curve_kernel_2.h | 16 ++--- .../include/CGAL/_test_algebraic_kernel_1.h | 10 +-- .../include/CGAL/_test_algebraic_kernel_2.h | 22 +++--- .../include/CGAL/_test_real_comparable.h | 16 ++--- Alpha_shapes_2/include/CGAL/Alpha_shape_2.h | 4 +- .../Alpha_shapes_2/internal/Lazy_alpha_nt_2.h | 8 +-- Alpha_shapes_3/include/CGAL/Alpha_shape_3.h | 4 +- .../Alpha_shapes_3/internal/Lazy_alpha_nt_3.h | 8 +-- .../CGAL/Alpha_wrap_3/internal/Alpha_wrap_3.h | 2 +- .../internal/Triangle_mesh_oracle.h | 2 +- .../internal/Triangle_soup_oracle.h | 2 +- .../Get_arithmetic_kernel.cpp | 6 +- .../Arr_bounded_planar_topology_traits_2.h | 8 +-- .../include/CGAL/Arr_overlay_2.h | 8 +-- .../CGAL/Arr_rat_arc/Base_rational_arc_ds_1.h | 6 +- .../CGAL/Arr_rat_arc/Rational_arc_d_1.h | 6 +- .../CGAL/Arr_spherical_topology_traits_2.h | 16 ++--- .../CGAL/Arr_unb_planar_topology_traits_2.h | 16 ++--- .../include/CGAL/Arrangement_on_surface_2.h | 4 +- .../include/CGAL/Arrangement_zone_2.h | 4 +- .../graph/IO/Generic_facegraph_builder.h | 8 +-- BGL/test/BGL/test_Properties.cpp | 8 +-- .../Gps_agg_meta_traits.h | 16 ++--- .../Gps_traits_decorator.h | 16 ++--- Circulator/include/CGAL/circulator.h | 14 ++-- .../include/CGAL/Cell_iterators.h | 12 ++-- .../include/CGAL/Combinatorial_map.h | 4 +- .../CGAL/Combinatorial_map_basic_operations.h | 16 ++--- .../CGAL/Combinatorial_map_iterators_base.h | 12 ++-- .../quick_hull_default_traits.cpp | 14 ++-- .../include/CGAL/GMap_cell_iterators.h | 8 +-- .../include/CGAL/GMap_dart_iterators.h | 6 +- .../include/CGAL/Generalized_map.h | 4 +- .../CGAL/Generalized_map_iterators_base.h | 4 +- .../Surface_mesh_geodesic_distances_3.h | 4 +- .../Installation/test_configuration_qt5.cpp | 2 +- .../include/CGAL/Intersection_traits.h | 6 +- .../internal/Bbox_3_Segment_3_do_intersect.h | 2 +- .../Test/_test_bigfloat_interval_traits.h | 2 +- .../include/CGAL/Test/_test_convert_to_bfi.h | 2 +- .../include/CGAL/Test/_test_interval_traits.h | 4 +- Kernel_23/include/CGAL/Circle_2.h | 2 +- Kernel_23/include/CGAL/Circle_3.h | 2 +- Kernel_23/include/CGAL/Direction_2.h | 2 +- Kernel_23/include/CGAL/Direction_3.h | 2 +- Kernel_23/include/CGAL/Has_conversion.h | 12 ++-- Kernel_23/include/CGAL/Iso_cuboid_3.h | 2 +- Kernel_23/include/CGAL/Iso_rectangle_2.h | 2 +- Kernel_23/include/CGAL/Line_2.h | 2 +- Kernel_23/include/CGAL/Line_3.h | 2 +- Kernel_23/include/CGAL/Plane_3.h | 2 +- Kernel_23/include/CGAL/Point_2.h | 2 +- Kernel_23/include/CGAL/Point_3.h | 2 +- Kernel_23/include/CGAL/Ray_2.h | 2 +- Kernel_23/include/CGAL/Ray_3.h | 2 +- Kernel_23/include/CGAL/Segment_2.h | 2 +- Kernel_23/include/CGAL/Segment_3.h | 2 +- Kernel_23/include/CGAL/Sphere_3.h | 2 +- Kernel_23/include/CGAL/Tetrahedron_3.h | 2 +- Kernel_23/include/CGAL/Triangle_2.h | 2 +- Kernel_23/include/CGAL/Triangle_3.h | 2 +- Kernel_23/include/CGAL/Vector_2.h | 2 +- Kernel_23/include/CGAL/Vector_3.h | 2 +- Kernel_23/include/CGAL/Weighted_point_2.h | 2 +- Kernel_23/include/CGAL/Weighted_point_3.h | 2 +- .../Kernel_23/test_RT_or_FT_predicates.cpp | 4 +- .../include/CGAL/Compact_mesh_cell_base_3.h | 4 +- Mesh_3/include/CGAL/Mesh_criteria_3.h | 8 +-- .../test/Mesh_3/test_meshing_polyhedron.cpp | 4 +- Nef_2/include/CGAL/Nef_2/PM_overlayer.h | 2 +- .../CGAL/NewKernel_d/Kernel_d_interface.h | 4 +- .../CGAL/NewKernel_d/Wrapper/Hyperplane_d.h | 2 +- .../CGAL/NewKernel_d/Wrapper/Point_d.h | 2 +- .../CGAL/NewKernel_d/Wrapper/Ref_count_obj.h | 2 +- .../CGAL/NewKernel_d/Wrapper/Segment_d.h | 2 +- .../CGAL/NewKernel_d/Wrapper/Sphere_d.h | 2 +- .../CGAL/NewKernel_d/Wrapper/Vector_d.h | 2 +- NewKernel_d/test/NewKernel_d/Epick_d.cpp | 10 +-- Number_types/include/CGAL/Lazy_exact_nt.h | 8 +-- Number_types/include/CGAL/Root_of_traits.h | 2 +- .../include/CGAL/Test/test_root_of_traits.h | 12 ++-- .../CGAL/simplest_rational_in_interval.h | 4 +- Number_types/include/CGAL/to_rational.h | 4 +- .../test/Number_types/Lazy_exact_nt_new.cpp | 10 +-- .../test/Number_types/Quotient_new.cpp | 6 +- .../test/Number_types/Sqrt_extension.h | 8 +-- .../include/CGAL/Test/test_root_of_2_traits.h | 6 +- .../internal/optimize_2.h | 2 +- .../oriented_bounding_box.h | 2 +- .../compute_registration_transformation.h | 8 +-- .../include/CGAL/OpenGR/register_point_sets.h | 8 +-- .../compute_registration_transformation.h | 12 ++-- .../include/CGAL/structure_point_set.h | 2 +- .../CGAL/Polygon_mesh_processing/clip.h | 4 +- .../connected_components.h | 2 +- .../Polygon_mesh_processing/corefinement.h | 8 +-- .../CGAL/Polygon_mesh_processing/distance.h | 2 +- .../intersect_triangle_and_segment_3.h | 2 +- .../Corefinement/intersection_nodes.h | 12 ++-- .../intersection_of_coplanar_triangles_3.h | 4 +- .../internal/Snapping/snap_vertices.h | 2 +- .../Polygon_mesh_processing/intersection.h | 6 +- .../CGAL/Polygon_mesh_processing/locate.h | 4 +- .../CGAL/Polygon_mesh_processing/measure.h | 4 +- .../orient_polygon_soup_extension.h | 4 +- .../polygon_mesh_to_polygon_soup.h | 2 +- .../polygon_soup_to_polygon_mesh.h | 2 +- .../repair_self_intersections.h | 2 +- .../Rigid_triangle_mesh_collision_detection.h | 4 +- .../Polyhedral_envelope_filter.h | 2 +- .../test_pmp_locate.cpp | 4 +- Polynomial/include/CGAL/Exponent_vector.h | 2 +- .../Polynomial/Algebraic_structure_traits.h | 4 +- .../include/CGAL/Polynomial/Polynomial_type.h | 4 +- Polynomial/include/CGAL/Polynomial_traits_d.h | 2 +- .../CGAL/Test/_test_polynomial_traits_d.h | 68 +++++++++---------- .../Polynomial/Polynomial_type_generator.cpp | 6 +- Polynomial/test/Polynomial/test_polynomial.h | 6 +- .../test_polynomial_Coercion_traits.cpp | 4 +- .../test_polynomial_Get_arithmetic_kernel.cpp | 4 +- Ridges_3/include/CGAL/Ridges.h | 8 +-- Ridges_3/include/CGAL/Umbilics.h | 8 +-- .../include/CGAL/Handle_with_policy.h | 12 ++-- .../include/CGAL/Named_function_parameters.h | 4 +- .../include/CGAL/transforming_pair_iterator.h | 2 +- .../test/STL_Extension/test_Cache.cpp | 12 ++-- .../STL_Extension/test_cgal_named_params.cpp | 18 ++--- .../test/STL_Extension/test_is_iterator.cpp | 12 ++-- .../test/STL_Extension/test_is_streamable.cpp | 4 +- .../test/STL_Extension/test_stl_extension.cpp | 18 ++--- .../Shape_regularization/regularize_planes.h | 2 +- .../include/CGAL/Snap_rounding_kd_2.h | 2 +- .../Bounded_distance_placement.h | 2 +- .../Edge_collapse/FastEnvelope_filter.h | 2 +- .../CGAL/Surface_mesher/Combining_oracle.h | 4 +- .../CGAL/No_intersection_surface_sweep_2.h | 4 +- .../CGAL/Delaunay_triangulation_on_sphere_2.h | 4 +- 156 files changed, 510 insertions(+), 521 deletions(-) diff --git a/AABB_tree/include/CGAL/AABB_tree/internal/AABB_ray_intersection.h b/AABB_tree/include/CGAL/AABB_tree/internal/AABB_ray_intersection.h index ff091ce6c24..87ebbe012ab 100644 --- a/AABB_tree/include/CGAL/AABB_tree/internal/AABB_ray_intersection.h +++ b/AABB_tree/include/CGAL/AABB_tree/internal/AABB_ray_intersection.h @@ -201,7 +201,7 @@ template boost::optional< typename AABB_tree::template Intersection_and_primitive_id::Type > AABB_tree::first_intersection(const Ray& query, const SkipFunctor& skip) const { - static_assert((std::is_same::value), + static_assert(std::is_same::value, "Ray and Ray_3 must be the same type"); switch(size()) // copy-paste from AABB_tree::traversal diff --git a/Algebraic_foundations/examples/Algebraic_foundations/fraction_traits.cpp b/Algebraic_foundations/examples/Algebraic_foundations/fraction_traits.cpp index 42c1e8d9288..4ecbef7420c 100644 --- a/Algebraic_foundations/examples/Algebraic_foundations/fraction_traits.cpp +++ b/Algebraic_foundations/examples/Algebraic_foundations/fraction_traits.cpp @@ -9,8 +9,8 @@ int main(){ typedef FT::Numerator_type Numerator_type; typedef FT::Denominator_type Denominator_type; - static_assert((std::is_same::value)); - static_assert((std::is_same::value)); + static_assert(std::is_same::value); + static_assert(std::is_same::value); Numerator_type numerator; Denominator_type denominator; diff --git a/Algebraic_foundations/examples/Algebraic_foundations/interoperable.cpp b/Algebraic_foundations/examples/Algebraic_foundations/interoperable.cpp index 0963f5f9d36..e85c2e8d73b 100644 --- a/Algebraic_foundations/examples/Algebraic_foundations/interoperable.cpp +++ b/Algebraic_foundations/examples/Algebraic_foundations/interoperable.cpp @@ -9,7 +9,7 @@ binary_func(const A& a , const B& b){ typedef CGAL::Coercion_traits CT; // check for explicit interoperability - static_assert((CT::Are_explicit_interoperable::value)); + static_assert(CT::Are_explicit_interoperable::value); // CT::Cast is used to to convert both types into the coercion type typename CT::Cast cast; diff --git a/Algebraic_foundations/include/CGAL/Algebraic_structure_traits.h b/Algebraic_foundations/include/CGAL/Algebraic_structure_traits.h index a632e12a197..e0d5eee6706 100644 --- a/Algebraic_foundations/include/CGAL/Algebraic_structure_traits.h +++ b/Algebraic_foundations/include/CGAL/Algebraic_structure_traits.h @@ -353,8 +353,7 @@ class Algebraic_structure_traits_base< Type_, typedef Coercion_traits< NT1, NT2 > CT; typedef typename CT::Type Coercion_type_NT1_NT2; CGAL_USE_TYPE(Coercion_type_NT1_NT2); - static_assert(( - ::std::is_same::value)); + static_assert(::std::is_same::value); typename Coercion_traits< NT1, NT2 >::Cast cast; operator()( cast(x), cast(y), q, r ); diff --git a/Algebraic_foundations/include/CGAL/Coercion_traits.h b/Algebraic_foundations/include/CGAL/Coercion_traits.h index 09c387b5a09..f6c9092dec6 100644 --- a/Algebraic_foundations/include/CGAL/Coercion_traits.h +++ b/Algebraic_foundations/include/CGAL/Coercion_traits.h @@ -35,9 +35,9 @@ #define CGAL_IMPLICIT_INTEROPERABLE_BINARY_OPERATOR_WITH_RT( NT, Result_type ) \ template < class CT_Type_1, class CT_Type_2 > \ Result_type operator()( const CT_Type_1& x, const CT_Type_2& y ) const { \ - static_assert((::std::is_same< \ + static_assert(::std::is_same< \ typename Coercion_traits< CT_Type_1, CT_Type_2 >::Type, NT \ - >::value)); \ + >::value) ; \ \ typename Coercion_traits< CT_Type_1, CT_Type_2 >::Cast cast; \ return operator()( cast(x), cast(y) ); \ diff --git a/Algebraic_foundations/include/CGAL/Scalar_factor_traits.h b/Algebraic_foundations/include/CGAL/Scalar_factor_traits.h index 2d784051197..5453868a132 100644 --- a/Algebraic_foundations/include/CGAL/Scalar_factor_traits.h +++ b/Algebraic_foundations/include/CGAL/Scalar_factor_traits.h @@ -85,13 +85,13 @@ public: // determine extractable scalar factor Scalar operator () (const NT& a) { - static_assert(( ::std::is_same< NT,Scalar >::value)); + static_assert(::std::is_same< NT,Scalar >::value); typedef typename Algebraic_structure_traits::Algebraic_category SAT; return scalar_factor(a, SAT()); } // determine extractable scalar factor Scalar operator () (const NT& a, const Scalar& d) { - static_assert(( ::std::is_same< NT,Scalar >::value)); + static_assert(::std::is_same< NT,Scalar >::value); typedef typename Algebraic_structure_traits::Algebraic_category SAT; return scalar_factor(a,d,SAT()); } diff --git a/Algebraic_foundations/include/CGAL/Test/_test_algebraic_structure.h b/Algebraic_foundations/include/CGAL/Test/_test_algebraic_structure.h index 68970af7441..82483c0dcce 100644 --- a/Algebraic_foundations/include/CGAL/Test/_test_algebraic_structure.h +++ b/Algebraic_foundations/include/CGAL/Test/_test_algebraic_structure.h @@ -44,7 +44,7 @@ template void check_result_type(AdaptableFunctor, ResultType){ typedef typename AdaptableFunctor::result_type result_type; - static_assert((::std::is_same::value)); + static_assert(::std::is_same::value); CGAL_USE_TYPE(result_type); } // check nothing for CGAL::Null_functor @@ -122,12 +122,11 @@ void test_algebraic_structure_intern( const CGAL::Integral_domain_tag& ) { CGAL_SNAP_AST_FUNCTORS(AST); using CGAL::Null_functor; - static_assert( - (!::std::is_same< Integral_division, Null_functor >::value)); - static_assert((!::std::is_same< Divides, Null_functor >::value)); - static_assert((!::std::is_same< Is_zero, Null_functor >::value)); - static_assert((!::std::is_same< Is_one, Null_functor >::value)); - static_assert((!::std::is_same< Square, Null_functor >::value)); + static_assert(!::std::is_same< Integral_division, Null_functor >::value); + static_assert(!::std::is_same< Divides, Null_functor >::value); + static_assert(!::std::is_same< Is_zero, Null_functor >::value); + static_assert(!::std::is_same< Is_one, Null_functor >::value); + static_assert(!::std::is_same< Square, Null_functor >::value); // functor const Is_zero is_zero = Is_zero(); @@ -206,7 +205,7 @@ void test_algebraic_structure_intern( CGAL_SNAP_AST_FUNCTORS(AST); using CGAL::Null_functor; - static_assert((!::std::is_same< Gcd, Null_functor>::value)); + static_assert(!::std::is_same< Gcd, Null_functor>::value); const Gcd gcd = Gcd(); assert( gcd( AS ( 0), AS ( 0)) == unit_normal( AS (0) ) ); @@ -268,9 +267,9 @@ void test_algebraic_structure_intern( const CGAL::Euclidean_ring_tag&) { CGAL_SNAP_AST_FUNCTORS(AST); using CGAL::Null_functor; - static_assert((!::std::is_same< Div, Null_functor>::value)); - static_assert((!::std::is_same< Mod, Null_functor>::value)); - static_assert((!::std::is_same< Div_mod, Null_functor>::value)); + static_assert(!::std::is_same< Div, Null_functor>::value); + static_assert(!::std::is_same< Mod, Null_functor>::value); + static_assert(!::std::is_same< Div_mod, Null_functor>::value); const Div div=Div(); const Mod mod=Mod(); @@ -387,7 +386,7 @@ void test_algebraic_structure_intern( const CGAL::Field_with_sqrt_tag& ) { CGAL_SNAP_AST_FUNCTORS(AST); - static_assert((!::std::is_same< Sqrt, Null_functor>::value)); + static_assert(!::std::is_same< Sqrt, Null_functor>::value); const Sqrt sqrt =Sqrt(); AS a(4); @@ -617,7 +616,7 @@ class Test_is_square { ( ::std::is_same< AS , First_argument_type>::value)); static_assert( ( ::std::is_same< AS& , Second_argument_type>::value)); - //static_assert(( ::std::is_same< bool , Result_type>::value)); + //static_assert(::std::is_same< bool , Result_type>::value); bool b = Result_type(true); CGAL_USE(b); AS test_number = AS(3)*AS(3); @@ -649,8 +648,8 @@ public: typedef typename Sqrt::result_type Result_type; CGAL_USE_TYPE(Argument_type); CGAL_USE_TYPE(Result_type); - static_assert(( ::std::is_same< AS , Argument_type>::value)); - static_assert(( ::std::is_same< AS , Result_type>::value)); + static_assert(::std::is_same< AS , Argument_type>::value); + static_assert(::std::is_same< AS , Result_type>::value); typedef Algebraic_structure_traits AST; typedef typename AST::Is_exact Is_exact; assert( !Is_exact::value || AS (3) == sqrt( AS (9))); @@ -803,7 +802,7 @@ void test_algebraic_structure(){ typedef CGAL::Algebraic_structure_traits< AS > AST; CGAL_SNAP_AST_FUNCTORS(AST); - static_assert((::std::is_same::value)); + static_assert(::std::is_same::value); typedef typename AST::Boolean Boolean; assert(!Boolean()); @@ -816,14 +815,12 @@ void test_algebraic_structure(){ using CGAL::Integral_domain_without_division_tag; using CGAL::Null_functor; // Test for desired exactness - static_assert( - ( ::std::is_same< typename AST::Is_exact, Is_exact >::value)); - - static_assert(( ::boost::is_convertible< Tag, - Integral_domain_without_division_tag >::value )); - static_assert(( ::std::is_same< Tag, Algebraic_category>::value)); - static_assert((!::std::is_same< Simplify, Null_functor>::value)); - static_assert((!::std::is_same< Unit_part, Null_functor>::value)); + static_assert(::std::is_same< typename AST::Is_exact, Is_exact >::value); + static_assert(::std::is_convertible< Tag, + Integral_domain_without_division_tag >::value ); + static_assert(::std::is_same< Tag, Algebraic_category>::value); + static_assert(!::std::is_same< Simplify, Null_functor>::value); + static_assert(!::std::is_same< Unit_part, Null_functor>::value); const Simplify simplify=Simplify();; const Unit_part unit_part= Unit_part(); diff --git a/Algebraic_foundations/include/CGAL/Test/_test_coercion_traits.h b/Algebraic_foundations/include/CGAL/Test/_test_coercion_traits.h index fab14e92e98..cff190a023d 100644 --- a/Algebraic_foundations/include/CGAL/Test/_test_coercion_traits.h +++ b/Algebraic_foundations/include/CGAL/Test/_test_coercion_traits.h @@ -346,9 +346,9 @@ void test_explicit_interoperable_one_way(){ typedef typename CT::Cast Cast; typedef typename Cast::result_type result_type; CGAL_USE_TYPE(result_type); - static_assert((::std::is_same::value)); - static_assert((::std::is_same< typename CT::Are_explicit_interoperable,CGAL::Tag_true>::value)); - static_assert((::std::is_same::value)); + static_assert(::std::is_same::value); + static_assert(::std::is_same< typename CT::Are_explicit_interoperable,CGAL::Tag_true>::value); + static_assert(::std::is_same::value); typename CT::Cast cast; A a(3); diff --git a/Algebraic_foundations/include/CGAL/Test/_test_fraction_traits.h b/Algebraic_foundations/include/CGAL/Test/_test_fraction_traits.h index c12411757b2..6d11b6f2c55 100644 --- a/Algebraic_foundations/include/CGAL/Test/_test_fraction_traits.h +++ b/Algebraic_foundations/include/CGAL/Test/_test_fraction_traits.h @@ -37,11 +37,11 @@ void test_fraction_traits(){ typedef typename FT::Compose Compose; CGAL_USE_TYPE(Is_fraction); - static_assert( (::std::is_same::value)); - static_assert( (::std::is_same::value)); - static_assert(!(::std::is_same::value)); - static_assert(!(::std::is_same::value)); - static_assert(!(::std::is_same::value)); + static_assert(::std::is_same::value); + static_assert(::std::is_same::value); + static_assert(!::std::is_same::value); + static_assert(!::std::is_same::value); + static_assert(!::std::is_same::value); // Decompose diff --git a/Algebraic_foundations/include/CGAL/Test/_test_rational_traits.h b/Algebraic_foundations/include/CGAL/Test/_test_rational_traits.h index 26dce67e619..68e648e69c5 100644 --- a/Algebraic_foundations/include/CGAL/Test/_test_rational_traits.h +++ b/Algebraic_foundations/include/CGAL/Test/_test_rational_traits.h @@ -29,7 +29,7 @@ void test_rational_traits(){ typedef Rational_traits Rational_traits; typedef typename Rational_traits::RT RT; - static_assert((::std::is_same::value)); + static_assert(::std::is_same::value); assert( Rational_traits().numerator(x) == RT(7)); assert( Rational_traits().denominator(x) == RT(2)); diff --git a/Algebraic_foundations/include/CGAL/Test/_test_real_embeddable.h b/Algebraic_foundations/include/CGAL/Test/_test_real_embeddable.h index 1f7e818d2d3..fbe5b66132b 100644 --- a/Algebraic_foundations/include/CGAL/Test/_test_real_embeddable.h +++ b/Algebraic_foundations/include/CGAL/Test/_test_real_embeddable.h @@ -48,9 +48,9 @@ namespace CGAL { void operator() (const ToDouble& to_double) { typedef typename ToDouble::argument_type Argument_type; typedef typename ToDouble::result_type Result_type; - static_assert(( ::std::is_same::value)); + static_assert( ::std::is_same::value); CGAL_USE_TYPE(Argument_type); - static_assert(( ::std::is_same::value)); + static_assert( ::std::is_same::value); CGAL_USE_TYPE(Result_type); assert(42.0 == to_double(Type(42))); } @@ -71,9 +71,9 @@ namespace CGAL { typedef typename To_interval::argument_type Argument_type; typedef typename To_interval::result_type Result_type; typedef std::pair Interval_type; - static_assert(( ::std::is_same::value)); + static_assert( ::std::is_same::value); CGAL_USE_TYPE(Argument_type); - static_assert(( ::std::is_same::value)); + static_assert( ::std::is_same::value); CGAL_USE_TYPE(Result_type); CGAL_USE_TYPE(Interval_type); // assert(NiX::in(42.0,to_Interval(Type(42)))); @@ -139,7 +139,7 @@ void test_real_embeddable() { CGAL_SNAP_RET_FUNCTORS(RET); typedef typename RET::Is_real_embeddable Is_real_embeddable; using CGAL::Tag_true; - static_assert(( ::std::is_same< Is_real_embeddable, Tag_true>::value)); + static_assert(::std::is_same< Is_real_embeddable, Tag_true>::value); CGAL_USE_TYPE(Is_real_embeddable); typedef typename RET::Boolean Boolean; @@ -246,7 +246,7 @@ void test_not_real_embeddable() { typedef CGAL::Real_embeddable_traits RET; typedef typename RET::Is_real_embeddable Is_real_embeddable; using CGAL::Tag_false; - static_assert(( ::std::is_same< Is_real_embeddable, Tag_false>::value)); + static_assert(::std::is_same< Is_real_embeddable, Tag_false>::value); CGAL_USE_TYPE(Is_real_embeddable); } @@ -254,13 +254,13 @@ void test_not_real_embeddable() { //template //void test_rounded_log2_abs(Type zero, CGAL::Null_functor, CeilLog2Abs) { // typedef CGAL::Null_functor Null_functor; -// static_assert(( ::std::is_same< CeilLog2Abs, Null_functor>::value)); +// static_assert(::std::is_same< CeilLog2Abs, Null_functor>::value); //} // //template //void test_rounded_log2_abs(Type zero, FloorLog2Abs fl_log, CeilLog2Abs cl_log) { // typedef CGAL::Null_functor Null_functor; -// static_assert((!::std::is_same< CeilLog2Abs, Null_functor>::value)); +// static_assert(!::std::is_same< CeilLog2Abs, Null_functor>::value); // // assert( fl_log(Type( 7)) == 2 ); // assert( cl_log(Type( 7)) == 3 ); diff --git a/Algebraic_foundations/test/Algebraic_foundations/Algebraic_extension_traits.cpp b/Algebraic_foundations/test/Algebraic_foundations/Algebraic_extension_traits.cpp index 03ee581bcbf..95c89235190 100644 --- a/Algebraic_foundations/test/Algebraic_foundations/Algebraic_extension_traits.cpp +++ b/Algebraic_foundations/test/Algebraic_foundations/Algebraic_extension_traits.cpp @@ -9,7 +9,7 @@ int main(){ typedef AET::Type Type; CGAL_USE_TYPE(Type); - static_assert((::std::is_same::value)); + static_assert(::std::is_same::value); typedef AET::Is_extended Is_extended; CGAL_USE_TYPE(Is_extended); @@ -20,10 +20,10 @@ int main(){ { typedef Normalization_factor::argument_type argument_type; CGAL_USE_TYPE(argument_type); - static_assert((::std::is_same::value)); + static_assert(::std::is_same::value); typedef Normalization_factor::result_type result_type; CGAL_USE_TYPE(result_type); - static_assert((::std::is_same::value)); + static_assert(::std::is_same::value); Normalization_factor nfac; assert(nfac(3)==1); } @@ -31,10 +31,10 @@ int main(){ { typedef DFAI::argument_type argument_type; CGAL_USE_TYPE(argument_type); - static_assert((::std::is_same::value)); + static_assert(::std::is_same::value); typedef DFAI::result_type result_type; CGAL_USE_TYPE(result_type); - static_assert((::std::is_same::value)); + static_assert(::std::is_same::value); DFAI dfai; assert(dfai(3)==1); } @@ -45,7 +45,7 @@ int main(){ typedef AET::Type Type; CGAL_USE_TYPE(Type); - static_assert((::std::is_same::value)); + static_assert(::std::is_same::value); typedef AET::Is_extended Is_extended; CGAL_USE_TYPE(Is_extended); @@ -56,10 +56,10 @@ int main(){ { typedef Normalization_factor::argument_type argument_type; CGAL_USE_TYPE(argument_type); - static_assert((::std::is_same::value)); + static_assert(::std::is_same::value); typedef Normalization_factor::result_type result_type; CGAL_USE_TYPE(result_type); - static_assert((::std::is_same::value)); + static_assert(::std::is_same::value); Normalization_factor nfac; assert(nfac(EXT(3))==1); assert(nfac(EXT(3,0,5))==1); @@ -69,10 +69,10 @@ int main(){ { typedef DFAI::argument_type argument_type; CGAL_USE_TYPE(argument_type); - static_assert((::std::is_same::value)); + static_assert(::std::is_same::value); typedef DFAI::result_type result_type; CGAL_USE_TYPE(result_type); - static_assert((::std::is_same::value)); + static_assert(::std::is_same::value); DFAI dfai; assert(dfai(EXT(3))==1); assert(dfai(EXT(3,0,5))==1); diff --git a/Algebraic_foundations/test/Algebraic_foundations/Algebraic_structure_traits.cpp b/Algebraic_foundations/test/Algebraic_foundations/Algebraic_structure_traits.cpp index f8cb5910ce1..efd31636c51 100644 --- a/Algebraic_foundations/test/Algebraic_foundations/Algebraic_structure_traits.cpp +++ b/Algebraic_foundations/test/Algebraic_foundations/Algebraic_structure_traits.cpp @@ -16,7 +16,7 @@ int main(){ typedef AST::Type Type; CGAL_USE_TYPE(Type); - static_assert((::std::is_same::value)); + static_assert(::std::is_same::value); typedef AST::Algebraic_category Algebraic_category; CGAL_USE_TYPE(Algebraic_category); @@ -25,10 +25,10 @@ int main(){ typedef AST::Is_exact Is_exact; CGAL_USE_TYPE(Is_exact); - static_assert((::std::is_same::value)); + static_assert(::std::is_same::value); typedef AST::Is_numerical_sensitive Is_sensitive; CGAL_USE_TYPE(Is_sensitive); - static_assert((::std::is_same::value)); + static_assert(::std::is_same::value); CGAL_IS_AST_NULL_FUNCTOR ( Simplify); CGAL_IS_AST_NULL_FUNCTOR ( Unit_part); diff --git a/Algebraic_foundations/test/Algebraic_foundations/Coercion_traits.cpp b/Algebraic_foundations/test/Algebraic_foundations/Coercion_traits.cpp index 7fcb803e94c..a0ec9d741a4 100644 --- a/Algebraic_foundations/test/Algebraic_foundations/Coercion_traits.cpp +++ b/Algebraic_foundations/test/Algebraic_foundations/Coercion_traits.cpp @@ -6,22 +6,17 @@ int main(){ { typedef CGAL::Coercion_traits CT; CGAL_USE_TYPE(CT); - static_assert(( std::is_same::value)); - static_assert( - ( std::is_same::value)); - static_assert( - ( std::is_same::value)); + static_assert( std::is_same::value); + static_assert( std::is_same::value); + static_assert( std::is_same::value); assert( 5 == CT::Cast()(5)); } { typedef CGAL::Coercion_traits CT; CGAL_USE_TYPE(CT); -// static_assert(( std::is_same::value)); - static_assert( - ( std::is_same::value)); - static_assert( - ( std::is_same::value)); - static_assert( - ( std::is_same::value)); +// static_assert( std::is_same::value); + static_assert(std::is_same::value); + static_assert(std::is_same::value); + static_assert(std::is_same::value); } } diff --git a/Algebraic_foundations/test/Algebraic_foundations/Real_embeddable_traits.cpp b/Algebraic_foundations/test/Algebraic_foundations/Real_embeddable_traits.cpp index 3d03fb37e38..f215c848458 100644 --- a/Algebraic_foundations/test/Algebraic_foundations/Real_embeddable_traits.cpp +++ b/Algebraic_foundations/test/Algebraic_foundations/Real_embeddable_traits.cpp @@ -16,11 +16,11 @@ int main(){ typedef RET::Type Type; CGAL_USE_TYPE(Type); - static_assert((::std::is_same::value)); + static_assert(::std::is_same::value); typedef RET::Is_real_embeddable Is_real_embeddable; CGAL_USE_TYPE(Is_real_embeddable); - static_assert((::std::is_same::value)); + static_assert(::std::is_same::value); CGAL_IS_RET_NULL_FUNCTOR(Abs); CGAL_IS_RET_NULL_FUNCTOR(Sgn); diff --git a/Algebraic_foundations/test/Algebraic_foundations/Scalar_factor_traits.cpp b/Algebraic_foundations/test/Algebraic_foundations/Scalar_factor_traits.cpp index af4cc52c0d6..1fe2fcf620d 100644 --- a/Algebraic_foundations/test/Algebraic_foundations/Scalar_factor_traits.cpp +++ b/Algebraic_foundations/test/Algebraic_foundations/Scalar_factor_traits.cpp @@ -7,33 +7,31 @@ int main(){ typedef CGAL::Scalar_factor_traits SFT; CGAL_USE_TYPE(SFT); - static_assert((::std::is_same::value)); - static_assert((::std::is_same::value)); + static_assert(::std::is_same::value); + static_assert(::std::is_same::value); typedef SFT::Scalar_factor Scalar_factor; { typedef Scalar_factor::result_type result_type; CGAL_USE_TYPE(result_type); - static_assert((::std::is_same::value)); + static_assert(::std::is_same::value); typedef Scalar_factor::argument_type argument_type; CGAL_USE_TYPE(argument_type); - static_assert((::std::is_same::value)); + static_assert(::std::is_same::value); } typedef SFT::Scalar_div Scalar_div; { typedef Scalar_div::result_type result_type; CGAL_USE_TYPE(result_type); - static_assert((::std::is_same::value)); + static_assert(::std::is_same::value); typedef Scalar_div::first_argument_type first_argument_type; CGAL_USE_TYPE(first_argument_type); - static_assert( - (::std::is_same::value)); + static_assert(::std::is_same::value); typedef Scalar_div::second_argument_type second_argument_type; CGAL_USE_TYPE(second_argument_type); - static_assert( - (::std::is_same::value)); + static_assert(::std::is_same::value); } int i; diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_curve_kernel_2.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_curve_kernel_2.h index a02edebb8e1..e92e01e0669 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_curve_kernel_2.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_curve_kernel_2.h @@ -481,18 +481,18 @@ public: Curve_analysis_2 _construct_defining_polynomial_from(Bound b) const { typedef CGAL::Fraction_traits FT; // We rely on the fact that the Bound is a fraction - static_assert((::std::is_same::value)); + static_assert(::std::is_same::value); typedef typename FT::Numerator_type Numerator; typedef typename FT::Denominator_type Denominator; typedef CGAL::Coercion_traits Num_coercion; - static_assert((::std::is_same + static_assert(::std::is_same ::value)); + typename Num_coercion::Type>::value); typedef CGAL::Coercion_traits Denom_coercion; - static_assert((::std::is_same + static_assert(::std::is_same ::value)); + typename Denom_coercion::Type>::value); typename Num_coercion::Cast num_cast; typename Denom_coercion::Cast denom_cast; typename FT::Decompose decompose; @@ -2541,18 +2541,18 @@ public: Polynomial_1 operator() (const Polynomial_2& f, Bound b) const { typedef CGAL::Fraction_traits FT; // We rely on the fact that the Bound is a fraction - static_assert((::std::is_same::value)); + static_assert(::std::is_same::value); typedef typename FT::Numerator_type Numerator; typedef typename FT::Denominator_type Denominator; typedef CGAL::Coercion_traits Num_coercion; - static_assert((::std::is_same + static_assert(::std::is_same ::value)); + typename Num_coercion::Type>::value); typedef CGAL::Coercion_traits Denom_coercion; - static_assert((::std::is_same + static_assert(::std::is_same ::value)); + typename Denom_coercion::Type>::value); typename Num_coercion::Cast num_cast; typename Denom_coercion::Cast denom_cast; typename FT::Decompose decompose; diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/algebraic_curve_kernel_2_tools.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/algebraic_curve_kernel_2_tools.h index 4a2b7bd038e..e9ff71e3e66 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/algebraic_curve_kernel_2_tools.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/algebraic_curve_kernel_2_tools.h @@ -224,14 +224,14 @@ template void cast_back_utcf(const Poly_coer_1& p,Polynomial_1& q) { // We can assume that both template arguments are polynomial types typedef CGAL::Fraction_traits FT; - static_assert((::std::is_same::value)); + static_assert(::std::is_same::value); typedef typename FT::Numerator_type Numerator; typedef typename FT::Denominator_type Denominator; typedef CGAL::Coercion_traits Num_coercion; - static_assert((::std::is_same + static_assert(::std::is_same ::value)); + typename Num_coercion::Type>::value); Numerator p_num; Denominator p_denom; typename FT::Decompose()(p,p_num,p_denom); diff --git a/Algebraic_kernel_d/test/Algebraic_kernel_d/Real_embeddable_traits_extension.cpp b/Algebraic_kernel_d/test/Algebraic_kernel_d/Real_embeddable_traits_extension.cpp index c56969868c1..d5917a016e5 100644 --- a/Algebraic_kernel_d/test/Algebraic_kernel_d/Real_embeddable_traits_extension.cpp +++ b/Algebraic_kernel_d/test/Algebraic_kernel_d/Real_embeddable_traits_extension.cpp @@ -47,8 +47,8 @@ void test_real_embeddable_extension(const NT_&){ typedef typename Floor::result_type Result_type; CGAL_USE_TYPE(Argument_type); CGAL_USE_TYPE(Result_type); - static_assert(( ::std::is_same::value)); - static_assert(( ::std::is_same::value)); + static_assert(::std::is_same::value); + static_assert(::std::is_same::value); assert(Integer(42) == floor(NT(42))); assert(Integer(-42) == floor(NT(-42))); } @@ -59,8 +59,8 @@ void test_real_embeddable_extension(const NT_&){ typedef typename Floor_log2_abs::result_type Result_type; CGAL_USE_TYPE(Argument_type); CGAL_USE_TYPE(Result_type); - static_assert(( ::std::is_same::value)); - static_assert(( ::std::is_same::value)); + static_assert(::std::is_same::value); + static_assert(::std::is_same::value); assert(long(0) == floor_log2_abs(NT(1))); assert(long(0) == floor_log2_abs(NT(-1))); @@ -86,8 +86,8 @@ void test_real_embeddable_extension(const NT_&){ typedef typename Ceil::result_type Result_type; CGAL_USE_TYPE(Argument_type); CGAL_USE_TYPE(Result_type); - static_assert(( ::std::is_same::value)); - static_assert(( ::std::is_same::value)); + static_assert(::std::is_same::value); + static_assert(::std::is_same::value); assert(Integer(42) == ceil(NT(42))); assert(Integer(-42) == ceil(NT(-42))); } @@ -98,8 +98,8 @@ void test_real_embeddable_extension(const NT_&){ typedef typename Ceil_log2_abs::result_type Result_type; CGAL_USE_TYPE(Argument_type); CGAL_USE_TYPE(Result_type); - static_assert(( ::std::is_same::value)); - static_assert(( ::std::is_same::value)); + static_assert(::std::is_same::value); + static_assert(::std::is_same::value); assert(long(0) == ceil_log2_abs(NT(1))); assert(long(0) == ceil_log2_abs(NT(-1))); diff --git a/Algebraic_kernel_d/test/Algebraic_kernel_d/include/CGAL/_test_algebraic_curve_kernel_2.h b/Algebraic_kernel_d/test/Algebraic_kernel_d/include/CGAL/_test_algebraic_curve_kernel_2.h index e110e2b7c95..f3332c1a4d2 100644 --- a/Algebraic_kernel_d/test/Algebraic_kernel_d/include/CGAL/_test_algebraic_curve_kernel_2.h +++ b/Algebraic_kernel_d/test/Algebraic_kernel_d/include/CGAL/_test_algebraic_curve_kernel_2.h @@ -62,20 +62,20 @@ void test_algebraic_curve_kernel_2() { typedef AlgebraicCurveKernel_2 AK_2; - /* static_assert( (::std::is_same< - Algebraic_real_1, typename AK::Algebraic_real_1 >::value) ); + /* static_assert(::std::is_same< + Algebraic_real_1, typename AK::Algebraic_real_1 >::value); - static_assert((::std::is_same< + static_assert(::std::is_same< Isolator, - typename AK::Isolator >::value) ); + typename AK::Isolator >::value); - static_assert((::std::is_same< + static_assert(::std::is_same< Coefficient, - typename AK::Coefficient >::value)); + typename AK::Coefficient >::value); - static_assert((::std::is_same< + static_assert(::std::is_same< Polynomial_1, - typename AK::Polynomial_1 >::value));*/ + typename AK::Polynomial_1 >::value);*/ typedef typename AK_2::Polynomial_2 Poly_2; typedef typename AK_2::Curve_analysis_2 Curve_analysis_2; diff --git a/Algebraic_kernel_d/test/Algebraic_kernel_d/include/CGAL/_test_algebraic_kernel_1.h b/Algebraic_kernel_d/test/Algebraic_kernel_d/include/CGAL/_test_algebraic_kernel_1.h index 7d12134feff..abe5ebfd32d 100644 --- a/Algebraic_kernel_d/test/Algebraic_kernel_d/include/CGAL/_test_algebraic_kernel_1.h +++ b/Algebraic_kernel_d/test/Algebraic_kernel_d/include/CGAL/_test_algebraic_kernel_1.h @@ -109,8 +109,8 @@ void test_algebraic_kernel_1(const AlgebraicKernel_d_1& ak_1){ typedef typename Name::result_type RT_; \ CGAL_USE_TYPE(AT_); \ CGAL_USE_TYPE(RT_); \ - {static_assert(( ::std::is_same::value));} \ - {static_assert(( ::std::is_same::value));} \ + {static_assert(::std::is_same::value);} \ + {static_assert(::std::is_same::value);} \ } #define CGAL_CHECK_BFUNCTION(Name,AT1,AT2,RT) \ { \ @@ -120,9 +120,9 @@ void test_algebraic_kernel_1(const AlgebraicKernel_d_1& ak_1){ CGAL_USE_TYPE(AT1_); \ CGAL_USE_TYPE(AT2_); \ CGAL_USE_TYPE(RT_); \ - {static_assert(( ::std::is_same::value));} \ - {static_assert(( ::std::is_same::value));} \ - {static_assert(( ::std::is_same::value));} \ + {static_assert(::std::is_same::value);} \ + {static_assert(::std::is_same::value);} \ + {static_assert(::std::is_same::value);} \ } // TODO: missing check for Construct_algebraic_real_1 diff --git a/Algebraic_kernel_d/test/Algebraic_kernel_d/include/CGAL/_test_algebraic_kernel_2.h b/Algebraic_kernel_d/test/Algebraic_kernel_d/include/CGAL/_test_algebraic_kernel_2.h index 4db859ddb25..bebcd0118e7 100644 --- a/Algebraic_kernel_d/test/Algebraic_kernel_d/include/CGAL/_test_algebraic_kernel_2.h +++ b/Algebraic_kernel_d/test/Algebraic_kernel_d/include/CGAL/_test_algebraic_kernel_2.h @@ -93,8 +93,8 @@ void test_algebraic_kernel_2(const AlgebraicKernel_2& ak_2) { typedef typename Name::result_type RT_; \ CGAL_USE_TYPE(AT_); \ CGAL_USE_TYPE(RT_); \ - {static_assert(( ::std::is_same::value));} \ - {static_assert(( ::std::is_same::value));} \ + {static_assert(::std::is_same::value);} \ + {static_assert(::std::is_same::value);} \ } #define CGAL_CHECK_BFUNCTION(Name,AT1,AT2,RT) \ { \ @@ -104,22 +104,22 @@ void test_algebraic_kernel_2(const AlgebraicKernel_2& ak_2) { CGAL_USE_TYPE(AT1_); \ CGAL_USE_TYPE(AT2_); \ CGAL_USE_TYPE(RT_); \ - {static_assert(( ::std::is_same::value));} \ - {static_assert(( ::std::is_same::value));} \ - {static_assert(( ::std::is_same::value));} \ + {static_assert(::std::is_same::value);} \ + {static_assert(::std::is_same::value);} \ + {static_assert(::std::is_same::value);} \ } - static_assert(( ::std::is_same + static_assert(::std::is_same - ::value)); + ::value); CGAL_CHECK_UFUNCTION(Is_square_free_2,Polynomial_2,bool); CGAL_CHECK_UFUNCTION(Make_square_free_2,Polynomial_2,Polynomial_2); // TODO: missing check for Square_free_factorize_2 CGAL_CHECK_BFUNCTION(Is_coprime_2,Polynomial_2,Polynomial_2,bool); - static_assert(( ::std::is_same - ::value)); + static_assert(::std::is_same + ::value); CGAL_CHECK_BFUNCTION(Number_of_solutions_2,Polynomial_2,Polynomial_2, size_type); CGAL_CHECK_UFUNCTION(Compute_x_2,Algebraic_real_2,Algebraic_real_1); @@ -128,8 +128,8 @@ void test_algebraic_kernel_2(const AlgebraicKernel_2& ak_2) { CGAL_CHECK_UFUNCTION(Compute_polynomial_y_2,Algebraic_real_2,Polynomial_1); CGAL_CHECK_BFUNCTION(Isolate_x_2,Algebraic_real_2,Polynomial_1,BInterval); CGAL_CHECK_BFUNCTION(Isolate_y_2,Algebraic_real_2,Polynomial_1,BInterval); - static_assert(( ::std::is_same - < BArray,typename Isolate_2::result_type>::value)); + static_assert(::std::is_same + < BArray,typename Isolate_2::result_type>::value); CGAL_CHECK_BFUNCTION(Sign_at_2,Polynomial_2,Algebraic_real_2,Sign); CGAL_CHECK_BFUNCTION(Is_zero_at_2,Polynomial_2,Algebraic_real_2,bool); CGAL_CHECK_BFUNCTION(Compare_x_2,Algebraic_real_2,Algebraic_real_2,Sign); diff --git a/Algebraic_kernel_d/test/Algebraic_kernel_d/include/CGAL/_test_real_comparable.h b/Algebraic_kernel_d/test/Algebraic_kernel_d/include/CGAL/_test_real_comparable.h index dc9f13e3a03..fa5bd929abe 100644 --- a/Algebraic_kernel_d/test/Algebraic_kernel_d/include/CGAL/_test_real_comparable.h +++ b/Algebraic_kernel_d/test/Algebraic_kernel_d/include/CGAL/_test_real_comparable.h @@ -39,8 +39,8 @@ namespace internal { void operator() (ToDouble to_double) { typedef typename ToDouble::argument_type Argument_type; typedef typename ToDouble::result_type Result_type; - static_assert((::std::is_same::value)); - static_assert((::std::is_same::value)); + static_assert(::std::is_same::value); + static_assert(::std::is_same::value); assert(42.0 == to_double(NT(42))); } }; @@ -59,8 +59,8 @@ namespace internal { void operator() (ToInterval to_Interval) { typedef typename ToInterval::argument_type Argument_type; typedef typename ToInterval::result_type Result_type; - static_assert((::std::is_same::value)); - static_assert((::std::is_same< typename Argument_type::Interval, Result_type>::value)); + static_assert(::std::is_same::value); + static_assert(::std::is_same< typename Argument_type::Interval, Result_type>::value); // TODO: NiX::in not available!? //assert(NiX::in(42.0,to_Interval(NT(42)))); @@ -99,7 +99,7 @@ void test_real_comparable() { typedef CGAL::Real_embeddable_traits Traits; typedef typename Traits::Is_real_embeddable Is_real_comparable; using ::CGAL::Tag_true; - static_assert((::std::is_same< Is_real_comparable, Tag_true>::value)); + static_assert(::std::is_same< Is_real_comparable, Tag_true>::value); typename Traits::Compare compare; typename Traits::Sign sign; typename Traits::Abs abs; @@ -168,20 +168,20 @@ void test_not_real_comparable() { typedef CGAL::Real_embeddable_traits Traits; typedef typename Traits::Is_real_embeddable Is_real_comparable; using ::CGAL::Tag_false; - static_assert((::std::is_same< Is_real_comparable, Tag_false>::value)); + static_assert(::std::is_same< Is_real_comparable, Tag_false>::value); } template void test_rounded_log2_abs(NT zero, ::CGAL::Null_functor, CeilLog2Abs) { typedef ::CGAL::Null_functor Nulltype; - static_assert((::std::is_same< CeilLog2Abs, Nulltype>::value)); + static_assert(::std::is_same< CeilLog2Abs, Nulltype>::value); } template void test_rounded_log2_abs(NT zero, FloorLog2Abs fl_log, CeilLog2Abs cl_log) { typedef ::CGAL::Null_functor Null_functor; - static_assert((!::std::is_same< CeilLog2Abs, Null_functor>::value)); + static_assert(!::std::is_same< CeilLog2Abs, Null_functor>::value); assert( fl_log(NT( 7)) == 2 ); assert( cl_log(NT( 7)) == 3 ); diff --git a/Alpha_shapes_2/include/CGAL/Alpha_shape_2.h b/Alpha_shapes_2/include/CGAL/Alpha_shape_2.h index 56e52417684..43be2407022 100644 --- a/Alpha_shapes_2/include/CGAL/Alpha_shape_2.h +++ b/Alpha_shapes_2/include/CGAL/Alpha_shape_2.h @@ -76,8 +76,8 @@ public: typedef Type_of_alpha FT; // check that simplices are correctly instantiated - static_assert( (std::is_same::value) ); - static_assert( (std::is_same::value) ); + static_assert(std::is_same::value); + static_assert(std::is_same::value); typedef typename Dt::Point Point; diff --git a/Alpha_shapes_2/include/CGAL/Alpha_shapes_2/internal/Lazy_alpha_nt_2.h b/Alpha_shapes_2/include/CGAL/Alpha_shapes_2/internal/Lazy_alpha_nt_2.h index 22565c21d85..7ce92e13c34 100644 --- a/Alpha_shapes_2/include/CGAL/Alpha_shapes_2/internal/Lazy_alpha_nt_2.h +++ b/Alpha_shapes_2/include/CGAL/Alpha_shapes_2/internal/Lazy_alpha_nt_2.h @@ -148,8 +148,8 @@ class Lazy_alpha_nt_2 Approx_point to_approx(const Input_point& wp) const { // The traits class' Point_2 must be convertible using the Cartesian converter - static_assert((Is_traits_point_convertible_2< - Input_traits, Kernel_approx, Kernel_exact, Weighted_tag>::value)); + static_assert(Is_traits_point_convertible_2< + Input_traits, Kernel_approx, Kernel_exact, Weighted_tag>::value); To_approx converter; return converter(wp); @@ -158,8 +158,8 @@ class Lazy_alpha_nt_2 Exact_point to_exact(const Input_point& wp) const { // The traits class' Point_2 must be convertible using the Cartesian converter - static_assert((Is_traits_point_convertible_2< - Input_traits, Kernel_approx, Kernel_exact, Weighted_tag>::value)); + static_assert(Is_traits_point_convertible_2< + Input_traits, Kernel_approx, Kernel_exact, Weighted_tag>::value); To_exact converter; return converter(wp); diff --git a/Alpha_shapes_3/include/CGAL/Alpha_shape_3.h b/Alpha_shapes_3/include/CGAL/Alpha_shape_3.h index a7fdc406b04..a4a93f82515 100644 --- a/Alpha_shapes_3/include/CGAL/Alpha_shape_3.h +++ b/Alpha_shapes_3/include/CGAL/Alpha_shape_3.h @@ -108,8 +108,8 @@ public: typedef typename Gt::FT Coord_type; //checks whether tags are correctly set in Vertex and Cell classes - static_assert( (std::is_same::value) ); - static_assert( (std::is_same::value) ); + static_assert(std::is_same::value); + static_assert(std::is_same::value); typedef typename Dt::Point Point; diff --git a/Alpha_shapes_3/include/CGAL/Alpha_shapes_3/internal/Lazy_alpha_nt_3.h b/Alpha_shapes_3/include/CGAL/Alpha_shapes_3/internal/Lazy_alpha_nt_3.h index f20b050c1a2..cf732c40d67 100644 --- a/Alpha_shapes_3/include/CGAL/Alpha_shapes_3/internal/Lazy_alpha_nt_3.h +++ b/Alpha_shapes_3/include/CGAL/Alpha_shapes_3/internal/Lazy_alpha_nt_3.h @@ -139,8 +139,8 @@ class Lazy_alpha_nt_3{ Approx_point to_approx(const Input_point& wp) const { // The traits class' Point_3 must be convertible using the Cartesian converter - static_assert((Is_traits_point_convertible_3< - Input_traits, Kernel_approx, Kernel_exact, Weighted_tag>::value)); + static_assert(Is_traits_point_convertible_3< + Input_traits, Kernel_approx, Kernel_exact, Weighted_tag>::value); To_approx converter; return converter(wp); @@ -149,8 +149,8 @@ class Lazy_alpha_nt_3{ Exact_point to_exact(const Input_point& wp) const { // The traits class' Point_3 must be convertible using the Cartesian converter - static_assert((Is_traits_point_convertible_3< - Input_traits, Kernel_approx, Kernel_exact, Weighted_tag>::value)); + static_assert(Is_traits_point_convertible_3< + Input_traits, Kernel_approx, Kernel_exact, Weighted_tag>::value); To_exact converter; return converter(wp); diff --git a/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Alpha_wrap_3.h b/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Alpha_wrap_3.h index 0d81f8b8193..648835842e3 100644 --- a/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Alpha_wrap_3.h +++ b/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Alpha_wrap_3.h @@ -193,7 +193,7 @@ public: { // Due to the Steiner point computation being a dichotomy, the algorithm is inherently inexact // and passing exact kernels is explicitly disabled to ensure no misunderstanding. - static_assert((std::is_floating_point::value)); + static_assert(std::is_floating_point::value); } public: diff --git a/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Triangle_mesh_oracle.h b/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Triangle_mesh_oracle.h index 122599a7d50..c87f82ac75f 100644 --- a/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Triangle_mesh_oracle.h +++ b/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Triangle_mesh_oracle.h @@ -146,7 +146,7 @@ public: VPM vpm = choose_parameter(get_parameter(np, internal_np::vertex_point), get_const_property_map(vertex_point, tmesh)); - static_assert((std::is_same::value_type, Point_3>::value)); + static_assert(std::is_same::value_type, Point_3>::value); Splitter_base::reserve(num_faces(tmesh)); diff --git a/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Triangle_soup_oracle.h b/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Triangle_soup_oracle.h index e602b708f95..0a8f589fc2d 100644 --- a/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Triangle_soup_oracle.h +++ b/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Triangle_soup_oracle.h @@ -143,7 +143,7 @@ public: #endif PPM pm = choose_parameter(get_parameter(np, internal_np::point_map)); - static_assert((std::is_same::value_type, Point_3>::value)); + static_assert(std::is_same::value_type, Point_3>::value); Splitter_base::reserve(faces.size()); diff --git a/Arithmetic_kernel/test/Arithmetic_kernel/Get_arithmetic_kernel.cpp b/Arithmetic_kernel/test/Arithmetic_kernel/Get_arithmetic_kernel.cpp index 2947c3a3761..7c48e66a2c1 100644 --- a/Arithmetic_kernel/test/Arithmetic_kernel/Get_arithmetic_kernel.cpp +++ b/Arithmetic_kernel/test/Arithmetic_kernel/Get_arithmetic_kernel.cpp @@ -18,17 +18,17 @@ int main() { { typedef CGAL::Get_arithmetic_kernel::Arithmetic_kernel AK_; CGAL_USE_TYPE(AK_); - static_assert((std::is_same::value)); + static_assert(std::is_same::value); } { typedef CGAL::Get_arithmetic_kernel::Arithmetic_kernel AK_; CGAL_USE_TYPE(AK_); - static_assert((std::is_same::value)); + static_assert(std::is_same::value); } { typedef CGAL::Get_arithmetic_kernel::Arithmetic_kernel AK_; CGAL_USE_TYPE(AK_); - static_assert((std::is_same::value)); + static_assert(std::is_same::value); } return 0; } diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_bounded_planar_topology_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_bounded_planar_topology_traits_2.h index 8b4a3e1eca2..8686132cc41 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_bounded_planar_topology_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_bounded_planar_topology_traits_2.h @@ -90,10 +90,10 @@ public: typedef typename Gt_adaptor_2::Top_side_category Top_side_category; typedef typename Gt_adaptor_2::Right_side_category Right_side_category; - static_assert((std::is_same< Left_side_category, Arr_oblivious_side_tag >::value)); - static_assert((std::is_same< Bottom_side_category, Arr_oblivious_side_tag >::value)); - static_assert((std::is_same< Top_side_category, Arr_oblivious_side_tag >::value)); - static_assert((std::is_same< Right_side_category, Arr_oblivious_side_tag >::value)); + static_assert(std::is_same< Left_side_category, Arr_oblivious_side_tag >::value); + static_assert(std::is_same< Bottom_side_category, Arr_oblivious_side_tag >::value); + static_assert(std::is_same< Top_side_category, Arr_oblivious_side_tag >::value); + static_assert(std::is_same< Right_side_category, Arr_oblivious_side_tag >::value); //@} /*! \struct diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_overlay_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_overlay_2.h index 5a32bb997d7..19a95a662f6 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_overlay_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_overlay_2.h @@ -172,14 +172,14 @@ overlay(const Arrangement_on_surface_2& arr1 typedef typename Agt2::Point_2 A_point; typedef typename Bgt2::Point_2 B_point; typedef typename Rgt2::Point_2 Res_point; - static_assert((boost::is_convertible::value)); - static_assert((boost::is_convertible::value)); + static_assert(std::is_convertible::value); + static_assert(std::is_convertible::value); typedef typename Agt2::X_monotone_curve_2 A_xcv; typedef typename Bgt2::X_monotone_curve_2 B_xcv; typedef typename Rgt2::X_monotone_curve_2 Res_xcv; - static_assert((boost::is_convertible::value)); - static_assert((boost::is_convertible::value)); + static_assert(std::is_convertible::value); + static_assert(std::is_convertible::value); typedef Arr_traits_basic_adaptor_2 Gt_adaptor_2; typedef Arr_overlay_traits_2 diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Base_rational_arc_ds_1.h b/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Base_rational_arc_ds_1.h index f72169eea37..f0ff24f1291 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Base_rational_arc_ds_1.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Base_rational_arc_ds_1.h @@ -62,9 +62,9 @@ public: typedef std::vector > Root_multiplicity_vector; - static_assert((std::is_same::value)); - static_assert((std::is_same::value)); + static_assert(std::is_same::value); + static_assert(std::is_same::value); public: diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Rational_arc_d_1.h b/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Rational_arc_d_1.h index da8875c4768..8b076506227 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Rational_arc_d_1.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Rational_arc_d_1.h @@ -100,9 +100,9 @@ public: typedef Algebraic_point_2 Point_2; - static_assert((std::is_same::value)); - static_assert((std::is_same::value)); + static_assert(std::is_same::value); + static_assert(std::is_same::value); public: const Rational_function& get_rational_function(const Polynomial_1& numerator, diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_spherical_topology_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_spherical_topology_traits_2.h index d7b170e979b..67202ce862f 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_spherical_topology_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_spherical_topology_traits_2.h @@ -91,14 +91,14 @@ public: typedef typename Gt_adaptor_2::Top_side_category Top_side_category; typedef typename Gt_adaptor_2::Right_side_category Right_side_category; - static_assert((std::is_same< Left_side_category, Arr_oblivious_side_tag >::value || - std::is_same< Left_side_category, Arr_identified_side_tag >::value)); - static_assert((std::is_same< Bottom_side_category, Arr_oblivious_side_tag >::value || - std::is_same< Bottom_side_category, Arr_contracted_side_tag >::value)); - static_assert((std::is_same< Top_side_category, Arr_oblivious_side_tag >::value || - std::is_same< Top_side_category, Arr_contracted_side_tag >::value)); - static_assert((std::is_same< Right_side_category, Arr_oblivious_side_tag >::value || - std::is_same< Right_side_category, Arr_identified_side_tag >::value)); + static_assert(std::is_same< Left_side_category, Arr_oblivious_side_tag >::value || + std::is_same< Left_side_category, Arr_identified_side_tag >::value); + static_assert(std::is_same< Bottom_side_category, Arr_oblivious_side_tag >::value || + std::is_same< Bottom_side_category, Arr_contracted_side_tag >::value); + static_assert(std::is_same< Top_side_category, Arr_oblivious_side_tag >::value || + std::is_same< Top_side_category, Arr_contracted_side_tag >::value); + static_assert(std::is_same< Right_side_category, Arr_oblivious_side_tag >::value || + std::is_same< Right_side_category, Arr_identified_side_tag >::value); //@} /*! \struct diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_unb_planar_topology_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_unb_planar_topology_traits_2.h index 30181d7270f..09cc7c94710 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_unb_planar_topology_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_unb_planar_topology_traits_2.h @@ -87,14 +87,14 @@ public: typedef typename Gt_adaptor_2::Top_side_category Top_side_category; typedef typename Gt_adaptor_2::Right_side_category Right_side_category; - static_assert((std::is_same< Left_side_category, Arr_oblivious_side_tag >::value || - std::is_same< Left_side_category, Arr_open_side_tag >::value)); - static_assert((std::is_same< Bottom_side_category, Arr_oblivious_side_tag >::value || - std::is_same< Bottom_side_category, Arr_open_side_tag >::value)); - static_assert((std::is_same< Top_side_category, Arr_oblivious_side_tag>::value || - std::is_same< Top_side_category, Arr_open_side_tag >::value)); - static_assert((std::is_same< Right_side_category, Arr_oblivious_side_tag >::value || - std::is_same< Right_side_category, Arr_open_side_tag >::value)); + static_assert(std::is_same< Left_side_category, Arr_oblivious_side_tag >::value || + std::is_same< Left_side_category, Arr_open_side_tag >::value); + static_assert(std::is_same< Bottom_side_category, Arr_oblivious_side_tag >::value || + std::is_same< Bottom_side_category, Arr_open_side_tag >::value); + static_assert(std::is_same< Top_side_category, Arr_oblivious_side_tag>::value || + std::is_same< Top_side_category, Arr_open_side_tag >::value); + static_assert(std::is_same< Right_side_category, Arr_oblivious_side_tag >::value || + std::is_same< Right_side_category, Arr_open_side_tag >::value); //@} /*! \struct diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_on_surface_2.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_on_surface_2.h index cf4ae5eb11b..ae87c8ddb28 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arrangement_on_surface_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_on_surface_2.h @@ -77,10 +77,10 @@ public: typedef typename Traits_adaptor_2::Top_side_category Top_side_category; typedef typename Traits_adaptor_2::Right_side_category Right_side_category; - static_assert((Arr_sane_identified_tagging::value)); + Right_side_category>::value); public: typedef Arrangement_on_surface_2 diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_zone_2.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_zone_2.h index d011306472e..81f1c8bad04 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arrangement_zone_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_zone_2.h @@ -67,10 +67,10 @@ protected: typedef typename Traits_adaptor_2::Top_side_category Top_side_category; typedef typename Traits_adaptor_2::Right_side_category Right_side_category; - static_assert((Arr_sane_identified_tagging::value)); + Right_side_category>::value); public: typedef ZoneVisitor_ Visitor; diff --git a/BGL/include/CGAL/boost/graph/IO/Generic_facegraph_builder.h b/BGL/include/CGAL/boost/graph/IO/Generic_facegraph_builder.h index 3ec90082793..1dd6235a28c 100644 --- a/BGL/include/CGAL/boost/graph/IO/Generic_facegraph_builder.h +++ b/BGL/include/CGAL/boost/graph/IO/Generic_facegraph_builder.h @@ -49,10 +49,10 @@ public: typedef typename CGAL::GetVertexPointMap::type VPM; // usually will be true, but might not be the case if using custom type points -// static_assert((std::is_same::value_type>::value)); -// static_assert((std::is_same::type>::value)); +// static_assert(std::is_same::value_type>::value); +// static_assert(std::is_same::type>::value); typedef typename internal_np::Lookup_named_param_def< internal_np::vertex_normal_map_t, NamedParameters, diff --git a/BGL/test/BGL/test_Properties.cpp b/BGL/test/BGL/test_Properties.cpp index ca63a2f7803..04c8ae7beb6 100644 --- a/BGL/test/BGL/test_Properties.cpp +++ b/BGL/test/BGL/test_Properties.cpp @@ -98,7 +98,7 @@ void test_vertex_index_map_uniqueness(const Graph& g, typedef typename CGAL::GetInitializedVertexIndexMap::const_type CVIM; // in the case where the map is passed by NP, its type doesn't depend on whether the mesh is const or not - static_assert((std::is_same::value), "VIM, CVIM must be the same type"); + static_assert(std::is_same::value, "VIM, CVIM must be the same type"); VIM ivim = CGAL::get_initialized_vertex_index_map(g, np); @@ -114,7 +114,7 @@ void test_halfedge_index_map_uniqueness(const Graph& g, typedef typename CGAL::GetInitializedHalfedgeIndexMap::const_type CHIM; // in the case where the map is passed by NP, its type doesn't depend on whether the mesh is const or not - static_assert((std::is_same::value), "HIM, CHIM must be the same type"); + static_assert(std::is_same::value, "HIM, CHIM must be the same type"); HIM ihim = CGAL::get_initialized_halfedge_index_map(g, np); @@ -130,7 +130,7 @@ void test_edge_index_map_uniqueness(const Graph& g, typedef typename CGAL::GetInitializedEdgeIndexMap::const_type CEIM; // in the case where the map is passed by NP, its type doesn't depend on whether the mesh is const or not - static_assert((std::is_same::value), "EIM, CEIM must be the same type"); + static_assert(std::is_same::value, "EIM, CEIM must be the same type"); EIM ieim = CGAL::get_initialized_edge_index_map(g, np); @@ -146,7 +146,7 @@ void test_face_index_map_uniqueness(const Graph& g, typedef typename CGAL::GetInitializedFaceIndexMap::const_type CFIM; // in the case where the map is passed by NP, its type doesn't depend on whether the mesh is const or not - static_assert((std::is_same::value), "FIM, CFIM must be the same type"); + static_assert(std::is_same::value, "FIM, CFIM must be the same type"); FIM ifim = CGAL::get_initialized_face_index_map(g, np); diff --git a/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_agg_meta_traits.h b/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_agg_meta_traits.h index ef8cc06083f..8a0744933e3 100644 --- a/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_agg_meta_traits.h +++ b/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_agg_meta_traits.h @@ -123,14 +123,14 @@ public: typedef typename Arr::Right_side_category Right_side_category; // a side is either oblivious or open (unbounded) - static_assert((std::is_same::value || - std::is_same::value)); - static_assert((std::is_same::value || - std::is_same::value)); - static_assert((std::is_same::value || - std::is_same::value)); - static_assert((std::is_same::value || - std::is_same::value)); + static_assert(std::is_same::value || + std::is_same::value); + static_assert(std::is_same::value || + std::is_same::value); + static_assert(std::is_same::value || + std::is_same::value); + static_assert(std::is_same::value || + std::is_same::value); typedef typename Arr::Halfedge_handle Halfedge_handle; typedef typename Arr::Vertex_handle Vertex_handle; diff --git a/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_traits_decorator.h b/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_traits_decorator.h index 9c59b4f3275..d9d6f19c1c9 100644 --- a/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_traits_decorator.h +++ b/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_traits_decorator.h @@ -53,14 +53,14 @@ public: typedef typename Base::Right_side_category Right_side_category; // a side is either oblivious or open (unbounded) - static_assert((std::is_same< Left_side_category, Arr_oblivious_side_tag >::value || - std::is_same< Left_side_category, Arr_open_side_tag >::value)); - static_assert((std::is_same< Bottom_side_category, Arr_oblivious_side_tag >::value || - std::is_same< Bottom_side_category, Arr_open_side_tag >::value)); - static_assert((std::is_same< Top_side_category, Arr_oblivious_side_tag >::value || - std::is_same< Top_side_category, Arr_open_side_tag >::value)); - static_assert((std::is_same< Right_side_category, Arr_oblivious_side_tag >::value || - std::is_same< Right_side_category, Arr_open_side_tag >::value)); + static_assert(std::is_same< Left_side_category, Arr_oblivious_side_tag >::value || + std::is_same< Left_side_category, Arr_open_side_tag >::value); + static_assert(std::is_same< Bottom_side_category, Arr_oblivious_side_tag >::value || + std::is_same< Bottom_side_category, Arr_open_side_tag >::value); + static_assert(std::is_same< Top_side_category, Arr_oblivious_side_tag >::value || + std::is_same< Top_side_category, Arr_open_side_tag >::value); + static_assert(std::is_same< Right_side_category, Arr_oblivious_side_tag >::value || + std::is_same< Right_side_category, Arr_open_side_tag >::value); class Ex_point_2 { diff --git a/Circulator/include/CGAL/circulator.h b/Circulator/include/CGAL/circulator.h index d985eba576c..2dcb0200ba6 100644 --- a/Circulator/include/CGAL/circulator.h +++ b/Circulator/include/CGAL/circulator.h @@ -193,45 +193,45 @@ template inline void Assert_circulator( const C &) { typedef typename Circulator_traits::category category; CGAL_USE_TYPE(category); - static_assert((boost::is_convertible::value)); + static_assert(boost::is_convertible::value); } template inline void Assert_iterator( const I &) { typedef typename Circulator_traits::category category; CGAL_USE_TYPE(category); - static_assert((boost::is_convertible::value)); + static_assert(boost::is_convertible::value); } template inline void Assert_input_category( const I &/*i*/) { typedef typename std::iterator_traits::iterator_category category; CGAL_USE_TYPE(category); - static_assert((boost::is_convertible::value)); + static_assert(boost::is_convertible::value); } template inline void Assert_output_category( const I &/*i*/) { typedef typename std::iterator_traits::iterator_category category; CGAL_USE_TYPE(category); - static_assert((boost::is_convertible::value)); + static_assert(boost::is_convertible::value); } template inline void Assert_forward_category( const IC &/*ic*/) { typedef typename std::iterator_traits::iterator_category category; CGAL_USE_TYPE(category); - static_assert((boost::is_convertible::value)); + static_assert(boost::is_convertible::value); } template inline void Assert_bidirectional_category( const IC &/*ic*/) { typedef typename std::iterator_traits::iterator_category category; CGAL_USE_TYPE(category); - static_assert((boost::is_convertible::value)); + static_assert(boost::is_convertible::value); } template inline void Assert_random_access_category( const IC &/*ic*/) { typedef typename std::iterator_traits::iterator_category category; CGAL_USE_TYPE(category); - static_assert((boost::is_convertible::value)); + static_assert(boost::is_convertible::value); } // The assert at-least-category functions use the following // functions to resolve properly. Note the proper order of the diff --git a/Combinatorial_map/include/CGAL/Cell_iterators.h b/Combinatorial_map/include/CGAL/Cell_iterators.h index 9f7095c1900..93104ba01e2 100644 --- a/Combinatorial_map/include/CGAL/Cell_iterators.h +++ b/Combinatorial_map/include/CGAL/Cell_iterators.h @@ -82,8 +82,8 @@ namespace CGAL { Ite(amap, adart, amap.get_new_mark()), mcell_mark_number(amap.get_new_mark()) { - static_assert( (std::is_same::value) ); + static_assert(std::is_same::value); CGAL_assertion(amap.is_whole_map_unmarked(mcell_mark_number)); mark_cell(amap, adart, mcell_mark_number); @@ -196,8 +196,8 @@ namespace CGAL { Ite(amap, adart), mmark_number(amap.get_new_mark()) { - static_assert( (std::is_same::value) ); + static_assert(std::is_same::value); CGAL_assertion(amap.is_whole_map_unmarked(mmark_number)); mark_cell(amap, adart, mmark_number); } @@ -303,8 +303,8 @@ namespace CGAL { Base(amap), mmark_number(amap.get_new_mark()) { - static_assert( (std::is_same::value) ); + static_assert(std::is_same::value); CGAL_assertion(amap.is_whole_map_unmarked(mmark_number)); mark_cell(amap, (*this), mmark_number); } diff --git a/Combinatorial_map/include/CGAL/Combinatorial_map.h b/Combinatorial_map/include/CGAL/Combinatorial_map.h index 7266c4cd541..e2145afb1f3 100644 --- a/Combinatorial_map/include/CGAL/Combinatorial_map.h +++ b/Combinatorial_map/include/CGAL/Combinatorial_map.h @@ -1524,8 +1524,8 @@ namespace CGAL { template < class Ite > std::ostream& display_orbits(std::ostream & aos) const { - static_assert( (std::is_same::value) ); + static_assert(std::is_same::value); unsigned int nb = 0; size_type amark = get_new_mark(); for ( typename Dart_range::const_iterator it1(darts().begin()), diff --git a/Combinatorial_map/include/CGAL/Combinatorial_map_basic_operations.h b/Combinatorial_map/include/CGAL/Combinatorial_map_basic_operations.h index 56991cc55d1..7cb121ff1d8 100644 --- a/Combinatorial_map/include/CGAL/Combinatorial_map_basic_operations.h +++ b/Combinatorial_map/include/CGAL/Combinatorial_map_basic_operations.h @@ -34,8 +34,8 @@ namespace CGAL typename Map::Dart_const_descriptor adart1, typename Map::Dart_const_descriptor adart2) { - static_assert( (std::is_same::value) ); + static_assert(std::is_same::value); bool found=false; for (Iterator it(amap, adart1); !found && it.cont(); ++it) @@ -57,8 +57,8 @@ namespace CGAL typename Map::Dart_const_descriptor adart, typename Map::size_type amark) { - static_assert( (std::is_same::value) ); + static_assert(std::is_same::value); bool res=true; for ( Iterator it(amap, adart); res && it.cont(); ++it ) @@ -98,8 +98,8 @@ namespace CGAL typename Map::Dart_const_descriptor adart, typename Map::size_type amark) { - static_assert( (std::is_same::value) ); + static_assert(std::is_same::value); CGAL_assertion( (is_whole_orbit_unmarked > (amap, adart, amark)) ); @@ -305,8 +305,8 @@ namespace CGAL typename Map::size_type amark, typename Map::size_type amark2=Map::INVALID_MARK) { - static_assert( (std::is_same::value) ); + static_assert(std::is_same::value); CGAL_assertion( (is_whole_orbit_unmarked > (amap, adart, amark)) ); diff --git a/Combinatorial_map/include/CGAL/Combinatorial_map_iterators_base.h b/Combinatorial_map/include/CGAL/Combinatorial_map_iterators_base.h index 25419ab98c0..a50266f7659 100644 --- a/Combinatorial_map/include/CGAL/Combinatorial_map_iterators_base.h +++ b/Combinatorial_map/include/CGAL/Combinatorial_map_iterators_base.h @@ -305,8 +305,8 @@ namespace CGAL { typedef typename Map::size_type size_type; - static_assert( (Bi<=Map::dimension && - std::is_same::value) ); + static_assert(Bi<=Map::dimension && + std::is_same::value); public: /// Main constructor. @@ -493,8 +493,8 @@ namespace CGAL { typedef typename Map::size_type size_type; - static_assert( (std::is_same::value) ); + static_assert(std::is_same::value); /// Main constructor. CMap_non_basic_iterator(Map& amap, Dart_descriptor adart1): @@ -579,8 +579,8 @@ namespace CGAL { /// True iff this iterator is basic typedef Tag_false Basic_iterator; - static_assert( (std::is_same::value) ); + static_assert(std::is_same::value); /// Main constructor. CMap_non_basic_iterator(Map& amap, Dart_descriptor adart): diff --git a/Convex_hull_3/test/Convex_hull_3/quick_hull_default_traits.cpp b/Convex_hull_3/test/Convex_hull_3/quick_hull_default_traits.cpp index cbb64ac931c..c52ef82bf22 100644 --- a/Convex_hull_3/test/Convex_hull_3/quick_hull_default_traits.cpp +++ b/Convex_hull_3/test/Convex_hull_3/quick_hull_default_traits.cpp @@ -23,12 +23,12 @@ using namespace CGAL::Convex_hull_3::internal; int main() { - static_assert( (std::is_same::type>::value) ); - static_assert( (std::is_same::type>::value) ); - static_assert( (std::is_same::type>::value) ); - static_assert( (std::is_same::type>::value) ); - static_assert( (std::is_same::type>::value) ); - static_assert( (std::is_same,Default_traits_for_Chull_3::type>::value) ); - static_assert( (std::is_same, boost::true_type >::Protector,CGAL::Protect_FPU_rounding >::value) ); + static_assert(std::is_same::type>::value); + static_assert(std::is_same::type>::value); + static_assert(std::is_same::type>::value); + static_assert(std::is_same::type>::value); + static_assert(std::is_same::type>::value); + static_assert(std::is_same,Default_traits_for_Chull_3::type>::value); + static_assert(std::is_same, boost::true_type >::Protector,CGAL::Protect_FPU_rounding >::value); return 0; } diff --git a/Generalized_map/include/CGAL/GMap_cell_iterators.h b/Generalized_map/include/CGAL/GMap_cell_iterators.h index f708a3a1321..55dbbff8308 100644 --- a/Generalized_map/include/CGAL/GMap_cell_iterators.h +++ b/Generalized_map/include/CGAL/GMap_cell_iterators.h @@ -70,8 +70,8 @@ namespace CGAL { Base(amap), mmark_number(amap.get_new_mark()) { - static_assert( (std::is_same::value) ); + static_assert(std::is_same::value); CGAL_assertion(amap.is_whole_map_unmarked(mmark_number)); mark_cell(amap, (*this), mmark_number); } @@ -183,8 +183,8 @@ namespace CGAL { Base(amap), mmark_number(amap.get_new_mark()) { - static_assert( (std::is_same::value) ); + static_assert(std::is_same::value); CGAL_assertion(amap.is_whole_map_unmarked(mmark_number)); mark_cell(amap, (*this), mmark_number); } diff --git a/Generalized_map/include/CGAL/GMap_dart_iterators.h b/Generalized_map/include/CGAL/GMap_dart_iterators.h index 1545166af3a..b2eaaf97b70 100644 --- a/Generalized_map/include/CGAL/GMap_dart_iterators.h +++ b/Generalized_map/include/CGAL/GMap_dart_iterators.h @@ -154,7 +154,7 @@ namespace CGAL { typedef Tag_false Use_mark; ///< True iff this iterator uses mark typedef Tag_true Basic_iterator; ///< True iff this iterator is basic - static_assert( (0<=Ai && Ai+delta<=Map::dimension && delta>1) ); + static_assert(0<=Ai && Ai+delta<=Map::dimension && delta>1); public: /// Main constructor. @@ -468,9 +468,9 @@ namespace CGAL { typedef Tag_false Use_mark; ///< True iff this iterator uses mark typedef Tag_true Basic_iterator; ///< True iff this iterator is basic - static_assert( (0<=Ai && delta11) ); + delta1>1); public: /// Main constructor. diff --git a/Generalized_map/include/CGAL/Generalized_map.h b/Generalized_map/include/CGAL/Generalized_map.h index bc9b60c0f90..d7f75bd151a 100644 --- a/Generalized_map/include/CGAL/Generalized_map.h +++ b/Generalized_map/include/CGAL/Generalized_map.h @@ -1347,8 +1347,8 @@ namespace CGAL { template < class Ite > std::ostream& display_orbits(std::ostream & aos) const { - static_assert( (std::is_same::value) ); + static_assert(std::is_same::value); unsigned int nb = 0; size_type amark = get_new_mark(); for ( typename Dart_range::const_iterator it1(darts().begin()), diff --git a/Generalized_map/include/CGAL/Generalized_map_iterators_base.h b/Generalized_map/include/CGAL/Generalized_map_iterators_base.h index 6e9976bca4b..034b1600f93 100644 --- a/Generalized_map/include/CGAL/Generalized_map_iterators_base.h +++ b/Generalized_map/include/CGAL/Generalized_map_iterators_base.h @@ -59,8 +59,8 @@ namespace CGAL { typedef Tag_true Use_mark; - static_assert( (Ai<=Map::dimension && - std::is_same::value) ); + static_assert(Ai<=Map::dimension && + std::is_same::value); public: /// Main constructor. diff --git a/Heat_method_3/include/CGAL/Heat_method_3/Surface_mesh_geodesic_distances_3.h b/Heat_method_3/include/CGAL/Heat_method_3/Surface_mesh_geodesic_distances_3.h index 150efcbf88e..0d688be64ed 100644 --- a/Heat_method_3/include/CGAL/Heat_method_3/Surface_mesh_geodesic_distances_3.h +++ b/Heat_method_3/include/CGAL/Heat_method_3/Surface_mesh_geodesic_distances_3.h @@ -752,8 +752,8 @@ class Surface_mesh_geodesic_distances_3 > #endif { - static_assert((std::is_same::value) || - (std::is_same::value)); + static_assert(std::is_same::value) || + (std::is_same::value); // extract real types from Default #ifdef CGAL_EIGEN3_ENABLED diff --git a/Installation/test/Installation/test_configuration_qt5.cpp b/Installation/test/Installation/test_configuration_qt5.cpp index 9a869cc25b6..73206ca0b4f 100644 --- a/Installation/test/Installation/test_configuration_qt5.cpp +++ b/Installation/test/Installation/test_configuration_qt5.cpp @@ -13,7 +13,7 @@ template typename CGAL::Coercion_traits::Type binary_func(const A& a , const B& b){ typedef CGAL::Coercion_traits CT; - static_assert((CT::Are_explicit_interoperable::value)); + static_assert(CT::Are_explicit_interoperable::value); typename CT::Cast cast; return cast(a)*cast(b); } diff --git a/Intersections_2/include/CGAL/Intersection_traits.h b/Intersections_2/include/CGAL/Intersection_traits.h index 3bfb327db9e..67dc7512581 100644 --- a/Intersections_2/include/CGAL/Intersection_traits.h +++ b/Intersections_2/include/CGAL/Intersection_traits.h @@ -181,8 +181,8 @@ do_intersect_impl(const A& a, const B& b, Dynamic_dimension_tag) { // inline // typename Intersection_traits< typename Kernel_traits::Kernel, A, B>::result_type >::type // intersection(const A& a, const B& b) { -// static_assert( (std::is_same::value), -// "intersection with objects of different dimensions not supported"); +// static_assert(std::is_same::value), +// "intersection with objects of different dimensions not supported"; // return internal::intersection_impl(a, b, typename A::Ambient_dimension()); // } @@ -190,7 +190,7 @@ do_intersect_impl(const A& a, const B& b, Dynamic_dimension_tag) { // inline // auto // K::Boolean // do_intersect(const A& a, const B& b) { -// static_assert((std::is_same::value), +// static_assert(std::is_same::value, // "do_intersect with objects of different dimensions not supported"); // return internal::do_intersect_impl(a, b, typename A::Ambient_dimension()); // } diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Segment_3_do_intersect.h b/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Segment_3_do_intersect.h index 183158050e8..b62510e7892 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Segment_3_do_intersect.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Segment_3_do_intersect.h @@ -66,7 +66,7 @@ class Do_intersect_bbox_segment_aux_is_greater double dmax; public: - static_assert((std::is_same::value)); + static_assert(std::is_same::value); Do_intersect_bbox_segment_aux_is_greater() : error(0.), tmax(0.), dmax(0.) {} diff --git a/Interval_support/include/CGAL/Test/_test_bigfloat_interval_traits.h b/Interval_support/include/CGAL/Test/_test_bigfloat_interval_traits.h index b82269dbf14..ba0ac8f14e7 100644 --- a/Interval_support/include/CGAL/Test/_test_bigfloat_interval_traits.h +++ b/Interval_support/include/CGAL/Test/_test_bigfloat_interval_traits.h @@ -41,7 +41,7 @@ void test_bigfloat_interval_traits() { typedef typename BFIT::Is_bigfloat_interval Is_bigfloat_interval; CGAL_USE_TYPE(Is_bigfloat_interval); // using CGAL::Tag_true; - static_assert(( ::std::is_same< Is_bigfloat_interval, CGAL::Tag_true>::value)); + static_assert(::std::is_same< Is_bigfloat_interval, CGAL::Tag_true>::value); const typename BFIT::Construct construct = typename BFIT::Construct(); const typename BFIT::Set_precision set_precision = typename BFIT::Set_precision(); diff --git a/Interval_support/include/CGAL/Test/_test_convert_to_bfi.h b/Interval_support/include/CGAL/Test/_test_convert_to_bfi.h index 59addf6a1fe..8235c825644 100644 --- a/Interval_support/include/CGAL/Test/_test_convert_to_bfi.h +++ b/Interval_support/include/CGAL/Test/_test_convert_to_bfi.h @@ -41,7 +41,7 @@ template void test_convert_to_bfi_from(BFI,From){ typedef typename CGAL::Coercion_traits::Type CT_type; CGAL_USE_TYPE(CT_type); - static_assert(( ::std::is_same::value)); + static_assert(::std::is_same::value); assert(CGAL::convert_to_bfi(From(0)) == BFI(0)); assert(CGAL::convert_to_bfi(From(1)) == BFI(1)); assert(CGAL::convert_to_bfi(From(2)) == BFI(2)); diff --git a/Interval_support/include/CGAL/Test/_test_interval_traits.h b/Interval_support/include/CGAL/Test/_test_interval_traits.h index dffa0a292e9..e90f8616ff2 100644 --- a/Interval_support/include/CGAL/Test/_test_interval_traits.h +++ b/Interval_support/include/CGAL/Test/_test_interval_traits.h @@ -74,8 +74,8 @@ void test_interval_traits() { typedef typename IT::With_empty_interval With_empty_interval; CGAL_USE_TYPE(Is_interval); using CGAL::Tag_true; - static_assert(( ::std::is_same< Is_interval, Tag_true>::value)); - static_assert(( ::std::is_same< Interval_, Interval>::value)); + static_assert(::std::is_same< Is_interval, Tag_true>::value); + static_assert(::std::is_same< Interval_, Interval>::value); test_with_empty_interval(With_empty_interval()); diff --git a/Kernel_23/include/CGAL/Circle_2.h b/Kernel_23/include/CGAL/Circle_2.h index 48a4896fe4e..b6020ff7528 100644 --- a/Kernel_23/include/CGAL/Circle_2.h +++ b/Kernel_23/include/CGAL/Circle_2.h @@ -35,7 +35,7 @@ class Circle_2 : public R_::Kernel_base::Circle_2 typedef typename R_::Aff_transformation_2 Aff_transformation_2; typedef Circle_2 Self; - static_assert((std::is_same::value)); + static_assert(std::is_same::value); public: diff --git a/Kernel_23/include/CGAL/Circle_3.h b/Kernel_23/include/CGAL/Circle_3.h index 4da79afd351..b23e651e9fc 100644 --- a/Kernel_23/include/CGAL/Circle_3.h +++ b/Kernel_23/include/CGAL/Circle_3.h @@ -43,7 +43,7 @@ template typedef typename R_::Direction_3 Direction_3; typedef Circle_3 Self; - static_assert((std::is_same::value)); + static_assert(std::is_same::value); public: diff --git a/Kernel_23/include/CGAL/Direction_2.h b/Kernel_23/include/CGAL/Direction_2.h index d3376d74021..407d4e31ed1 100644 --- a/Kernel_23/include/CGAL/Direction_2.h +++ b/Kernel_23/include/CGAL/Direction_2.h @@ -38,7 +38,7 @@ class Direction_2 : public R_::Kernel_base::Direction_2 typedef typename R_::Kernel_base::Direction_2 RDirection_2; typedef Direction_2 Self; - static_assert((std::is_same::value)); + static_assert(std::is_same::value); public: diff --git a/Kernel_23/include/CGAL/Direction_3.h b/Kernel_23/include/CGAL/Direction_3.h index 6c0d1359657..18a88f7954d 100644 --- a/Kernel_23/include/CGAL/Direction_3.h +++ b/Kernel_23/include/CGAL/Direction_3.h @@ -37,7 +37,7 @@ class Direction_3 : public R_::Kernel_base::Direction_3 typedef typename R_::Aff_transformation_3 Aff_transformation_3; typedef Direction_3 Self; - static_assert((std::is_same::value)); + static_assert(std::is_same::value); public: diff --git a/Kernel_23/include/CGAL/Has_conversion.h b/Kernel_23/include/CGAL/Has_conversion.h index 0a042781fac..4e5d4603254 100644 --- a/Kernel_23/include/CGAL/Has_conversion.h +++ b/Kernel_23/include/CGAL/Has_conversion.h @@ -23,9 +23,9 @@ namespace internal { template struct Converter_selector { - static_assert((std::is_same::value), - "Kernels must have the same representation"); + static_assert(std::is_same::value, + "Kernels must have the same representation"); typedef CGAL::Cartesian_converter type; }; @@ -33,9 +33,9 @@ struct Converter_selector template struct Converter_selector { - static_assert((std::is_same::value), - "Kernels must have the same representation"); + static_assert(std::is_same::value, + "Kernels must have the same representation"); typedef CGAL::Homogeneous_converter type; }; diff --git a/Kernel_23/include/CGAL/Iso_cuboid_3.h b/Kernel_23/include/CGAL/Iso_cuboid_3.h index 22eeefbd4aa..d279426727f 100644 --- a/Kernel_23/include/CGAL/Iso_cuboid_3.h +++ b/Kernel_23/include/CGAL/Iso_cuboid_3.h @@ -35,7 +35,7 @@ class Iso_cuboid_3 : public R_::Kernel_base::Iso_cuboid_3 typedef typename R_::Aff_transformation_3 Aff_transformation_3; typedef Iso_cuboid_3 Self; - static_assert((std::is_same::value)); + static_assert(std::is_same::value); public: diff --git a/Kernel_23/include/CGAL/Iso_rectangle_2.h b/Kernel_23/include/CGAL/Iso_rectangle_2.h index e02aad3d267..7d3dc5a4709 100644 --- a/Kernel_23/include/CGAL/Iso_rectangle_2.h +++ b/Kernel_23/include/CGAL/Iso_rectangle_2.h @@ -33,7 +33,7 @@ class Iso_rectangle_2 : public R_::Kernel_base::Iso_rectangle_2 typedef typename R_::Aff_transformation_2 Aff_transformation_2; typedef Iso_rectangle_2 Self; - static_assert((std::is_same::value)); + static_assert(std::is_same::value); public: diff --git a/Kernel_23/include/CGAL/Line_2.h b/Kernel_23/include/CGAL/Line_2.h index 141e6d6fb13..33406d119a5 100644 --- a/Kernel_23/include/CGAL/Line_2.h +++ b/Kernel_23/include/CGAL/Line_2.h @@ -41,7 +41,7 @@ class Line_2 : public R_::Kernel_base::Line_2 typedef typename R_::Kernel_base::Line_2 RLine_2; typedef Line_2 Self; - static_assert((std::is_same::value)); + static_assert(std::is_same::value); public: diff --git a/Kernel_23/include/CGAL/Line_3.h b/Kernel_23/include/CGAL/Line_3.h index 8ceb47b6280..ebfb32c7972 100644 --- a/Kernel_23/include/CGAL/Line_3.h +++ b/Kernel_23/include/CGAL/Line_3.h @@ -38,7 +38,7 @@ class Line_3 : public R_::Kernel_base::Line_3 typedef typename R_::Aff_transformation_3 Aff_transformation_3; typedef Line_3 Self; - static_assert((std::is_same::value)); + static_assert(std::is_same::value); public: diff --git a/Kernel_23/include/CGAL/Plane_3.h b/Kernel_23/include/CGAL/Plane_3.h index f41fc96bb81..b391b4388d2 100644 --- a/Kernel_23/include/CGAL/Plane_3.h +++ b/Kernel_23/include/CGAL/Plane_3.h @@ -41,7 +41,7 @@ class Plane_3 : public R_::Kernel_base::Plane_3 typedef typename R_::Aff_transformation_3 Aff_transformation_3; typedef Plane_3 Self; - static_assert((std::is_same::value)); + static_assert(std::is_same::value); public: diff --git a/Kernel_23/include/CGAL/Point_2.h b/Kernel_23/include/CGAL/Point_2.h index ee8df80b329..96bffa243e2 100644 --- a/Kernel_23/include/CGAL/Point_2.h +++ b/Kernel_23/include/CGAL/Point_2.h @@ -37,7 +37,7 @@ class Point_2 : public R_::Kernel_base::Point_2 typedef typename R_::Kernel_base::Point_2 RPoint_2; typedef Point_2 Self; - static_assert((std::is_same::value)); + static_assert(std::is_same::value); public: diff --git a/Kernel_23/include/CGAL/Point_3.h b/Kernel_23/include/CGAL/Point_3.h index 27d1d19e0df..f2444a9506c 100644 --- a/Kernel_23/include/CGAL/Point_3.h +++ b/Kernel_23/include/CGAL/Point_3.h @@ -34,7 +34,7 @@ class Point_3 : public R_::Kernel_base::Point_3 typedef typename R_::Aff_transformation_3 Aff_transformation_3; typedef Point_3 Self; - static_assert((std::is_same::value)); + static_assert(std::is_same::value); public: diff --git a/Kernel_23/include/CGAL/Ray_2.h b/Kernel_23/include/CGAL/Ray_2.h index 73eecc1c025..626730bbc86 100644 --- a/Kernel_23/include/CGAL/Ray_2.h +++ b/Kernel_23/include/CGAL/Ray_2.h @@ -42,7 +42,7 @@ class Ray_2 : public R_::Kernel_base::Ray_2 typedef typename R_::Kernel_base::Ray_2 RRay_2; typedef Ray_2 Self; - static_assert((std::is_same::value)); + static_assert(std::is_same::value); public: diff --git a/Kernel_23/include/CGAL/Ray_3.h b/Kernel_23/include/CGAL/Ray_3.h index c2880eab254..b415af7ad01 100644 --- a/Kernel_23/include/CGAL/Ray_3.h +++ b/Kernel_23/include/CGAL/Ray_3.h @@ -36,7 +36,7 @@ class Ray_3 : public R_::Kernel_base::Ray_3 typedef typename R_::Aff_transformation_3 Aff_transformation_3; typedef Ray_3 Self; - static_assert((std::is_same::value)); + static_assert(std::is_same::value); public: diff --git a/Kernel_23/include/CGAL/Segment_2.h b/Kernel_23/include/CGAL/Segment_2.h index b789fe25aac..d5d89246f3b 100644 --- a/Kernel_23/include/CGAL/Segment_2.h +++ b/Kernel_23/include/CGAL/Segment_2.h @@ -40,7 +40,7 @@ class Segment_2 : public R_::Kernel_base::Segment_2 typedef typename R_::Kernel_base::Segment_2 RSegment_2; typedef Segment_2 Self; - static_assert((std::is_same::value)); + static_assert(std::is_same::value); public: diff --git a/Kernel_23/include/CGAL/Segment_3.h b/Kernel_23/include/CGAL/Segment_3.h index 45aa885fe1d..61e02d657db 100644 --- a/Kernel_23/include/CGAL/Segment_3.h +++ b/Kernel_23/include/CGAL/Segment_3.h @@ -38,7 +38,7 @@ class Segment_3 : public R_::Kernel_base::Segment_3 typedef typename R_::Aff_transformation_3 Aff_transformation_3; typedef Segment_3 Self; - static_assert((std::is_same::value)); + static_assert(std::is_same::value); public: diff --git a/Kernel_23/include/CGAL/Sphere_3.h b/Kernel_23/include/CGAL/Sphere_3.h index 76fa374f831..b0a7c271e24 100644 --- a/Kernel_23/include/CGAL/Sphere_3.h +++ b/Kernel_23/include/CGAL/Sphere_3.h @@ -37,7 +37,7 @@ class Sphere_3 : public R_::Kernel_base::Sphere_3 typedef typename R_::Aff_transformation_3 Aff_transformation_3; typedef Sphere_3 Self; - static_assert((std::is_same::value)); + static_assert(std::is_same::value); public: diff --git a/Kernel_23/include/CGAL/Tetrahedron_3.h b/Kernel_23/include/CGAL/Tetrahedron_3.h index 58710cbd72c..549680d2554 100644 --- a/Kernel_23/include/CGAL/Tetrahedron_3.h +++ b/Kernel_23/include/CGAL/Tetrahedron_3.h @@ -33,7 +33,7 @@ class Tetrahedron_3 : public R_::Kernel_base::Tetrahedron_3 typedef typename R_::Aff_transformation_3 Aff_transformation_3; typedef Tetrahedron_3 Self; - static_assert((std::is_same::value)); + static_assert(std::is_same::value); public: diff --git a/Kernel_23/include/CGAL/Triangle_2.h b/Kernel_23/include/CGAL/Triangle_2.h index 1e1d38e707e..8deabe91f6e 100644 --- a/Kernel_23/include/CGAL/Triangle_2.h +++ b/Kernel_23/include/CGAL/Triangle_2.h @@ -35,7 +35,7 @@ class Triangle_2 : public R_::Kernel_base::Triangle_2 typedef typename R_::Kernel_base::Triangle_2 RTriangle_2; typedef Triangle_2 Self; - static_assert((std::is_same::value)); + static_assert(std::is_same::value); public: diff --git a/Kernel_23/include/CGAL/Triangle_3.h b/Kernel_23/include/CGAL/Triangle_3.h index 93d30cc4de2..19bbd8064ec 100644 --- a/Kernel_23/include/CGAL/Triangle_3.h +++ b/Kernel_23/include/CGAL/Triangle_3.h @@ -36,7 +36,7 @@ class Triangle_3 : public R_::Kernel_base::Triangle_3 typedef typename R_::Aff_transformation_3 Aff_transformation_3; typedef Triangle_3 Self; - static_assert((std::is_same::value)); + static_assert(std::is_same::value); public: diff --git a/Kernel_23/include/CGAL/Vector_2.h b/Kernel_23/include/CGAL/Vector_2.h index dcb85eaeb4a..4449fc3ef9f 100644 --- a/Kernel_23/include/CGAL/Vector_2.h +++ b/Kernel_23/include/CGAL/Vector_2.h @@ -42,7 +42,7 @@ class Vector_2 : public R_::Kernel_base::Vector_2 typedef typename R_::Kernel_base::Vector_2 RVector_2; typedef Vector_2 Self; - static_assert((std::is_same::value)); + static_assert(std::is_same::value); public: diff --git a/Kernel_23/include/CGAL/Vector_3.h b/Kernel_23/include/CGAL/Vector_3.h index 0d3f16fc2fc..9220f3e8527 100644 --- a/Kernel_23/include/CGAL/Vector_3.h +++ b/Kernel_23/include/CGAL/Vector_3.h @@ -42,7 +42,7 @@ class Vector_3 : public R_::Kernel_base::Vector_3 typedef typename R_::Aff_transformation_3 Aff_transformation_3; typedef Vector_3 Self; - static_assert((std::is_same::value)); + static_assert(std::is_same::value); public: diff --git a/Kernel_23/include/CGAL/Weighted_point_2.h b/Kernel_23/include/CGAL/Weighted_point_2.h index d2c4f4a48e1..32ca07df153 100644 --- a/Kernel_23/include/CGAL/Weighted_point_2.h +++ b/Kernel_23/include/CGAL/Weighted_point_2.h @@ -34,7 +34,7 @@ class Weighted_point_2 : public R_::Kernel_base::Weighted_point_2 typedef typename R_::FT RT; typedef Weighted_point_2 Self; - static_assert((std::is_same::value)); + static_assert(std::is_same::value); public: typedef Dimension_tag<2> Ambient_dimension; diff --git a/Kernel_23/include/CGAL/Weighted_point_3.h b/Kernel_23/include/CGAL/Weighted_point_3.h index b9358604af8..28e8f9489a5 100644 --- a/Kernel_23/include/CGAL/Weighted_point_3.h +++ b/Kernel_23/include/CGAL/Weighted_point_3.h @@ -34,7 +34,7 @@ class Weighted_point_3 : public R_::Kernel_base::Weighted_point_3 typedef typename R_::FT FT; typedef Weighted_point_3 Self; - static_assert((std::is_same::value)); + static_assert(std::is_same::value); public: diff --git a/Kernel_23/test/Kernel_23/test_RT_or_FT_predicates.cpp b/Kernel_23/test/Kernel_23/test_RT_or_FT_predicates.cpp index 03b2787cc0b..b0771f329ca 100644 --- a/Kernel_23/test/Kernel_23/test_RT_or_FT_predicates.cpp +++ b/Kernel_23/test/Kernel_23/test_RT_or_FT_predicates.cpp @@ -229,12 +229,12 @@ void generate_atomic_compilation_test(const std::string& FT_name, if(check != NO_CHECK) { - out << " static_assert((std::is_same::value));\n"; diff --git a/Mesh_3/include/CGAL/Compact_mesh_cell_base_3.h b/Mesh_3/include/CGAL/Compact_mesh_cell_base_3.h index e336fe53d39..d30acbcb141 100644 --- a/Mesh_3/include/CGAL/Compact_mesh_cell_base_3.h +++ b/Mesh_3/include/CGAL/Compact_mesh_cell_base_3.h @@ -485,8 +485,8 @@ public: template const Point_3& weighted_circumcenter(const GT_& gt) const { - static_assert((std::is_same::value)); + static_assert(std::is_same::value); if (internal_tbb::is_null(weighted_circumcenter_)) { this->try_to_set_circumcenter( new Point_3(gt.construct_weighted_circumcenter_3_object() diff --git a/Mesh_3/include/CGAL/Mesh_criteria_3.h b/Mesh_3/include/CGAL/Mesh_criteria_3.h index cd46b813cd6..0fa4cf43902 100644 --- a/Mesh_3/include/CGAL/Mesh_criteria_3.h +++ b/Mesh_3/include/CGAL/Mesh_criteria_3.h @@ -101,19 +101,19 @@ public: template void add_facet_criterion(Facet_criterion* criterion) { - static_assert((boost::is_base_of< + static_assert(boost::is_base_of< typename Facet_criteria::Abstract_criterion, Facet_criterion - >::value)); + >::value); facet_criteria_.add(criterion); } template void add_cell_criterion(Cell_criterion* criterion) { - static_assert((boost::is_base_of< + static_assert(boost::is_base_of< typename Cell_criteria::Abstract_criterion, Cell_criterion - >::value)); + >::value); cell_criteria_.add(criterion); } diff --git a/Mesh_3/test/Mesh_3/test_meshing_polyhedron.cpp b/Mesh_3/test/Mesh_3/test_meshing_polyhedron.cpp index 76addcd6f61..cb8bcbe6125 100644 --- a/Mesh_3/test/Mesh_3/test_meshing_polyhedron.cpp +++ b/Mesh_3/test/Mesh_3/test_meshing_polyhedron.cpp @@ -35,10 +35,10 @@ struct Polyhedron_tester : public Tester typedef CGAL::Polyhedron_3 Polyhedron; typedef CGAL::Polyhedral_mesh_domain_3 Mesh_domain; - static_assert((std::is_same< + static_assert(std::is_same< typename Mesh_domain::Surface_patch_index, std::pair - >::value)); + >::value); typedef typename CGAL::Mesh_triangulation_3< Mesh_domain, diff --git a/Nef_2/include/CGAL/Nef_2/PM_overlayer.h b/Nef_2/include/CGAL/Nef_2/PM_overlayer.h index 5ce03215db3..a1aced0e3ff 100644 --- a/Nef_2/include/CGAL/Nef_2/PM_overlayer.h +++ b/Nef_2/include/CGAL/Nef_2/PM_overlayer.h @@ -959,7 +959,7 @@ bool is_forward_edge(const Const_decorator& N, void assert_type_precondition() const { typename PM_decorator_::Point p1; Point p2; - static_assert((std::is_same::value)); } + static_assert(std::is_same::value); } diff --git a/NewKernel_d/include/CGAL/NewKernel_d/Kernel_d_interface.h b/NewKernel_d/include/CGAL/NewKernel_d/Kernel_d_interface.h index b00b0af2d16..31f86c5c43a 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/Kernel_d_interface.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/Kernel_d_interface.h @@ -135,8 +135,8 @@ template struct Kernel_d_interface : public Base_ { typedef typename Base::Point_cartesian_const_iterator result_type; // Kernel_d requires a common iterator type for points and vectors // TODO: provide this mixed functor in preKernel? - // static_assert((std::is_same::type>::type, result_type>::value)); - // static_assert((std::is_same::type, result_type>::value)); + // static_assert(std::is_same::type>::type, result_type>::value); + // static_assert(std::is_same::type, result_type>::value); template auto operator()(Point_d const&p, Tag_ t)const{ return CPI(this->kernel())(p,t); diff --git a/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Hyperplane_d.h b/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Hyperplane_d.h index c4f7a47040b..4efc63d87a6 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Hyperplane_d.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Hyperplane_d.h @@ -32,7 +32,7 @@ class Hyperplane_d : public Get_type:: typedef typename Get_functor::type HTBase; typedef Hyperplane_d Self; - static_assert((std::is_same::type>::value)); + static_assert(std::is_same::type>::value); public: diff --git a/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Point_d.h b/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Point_d.h index ed038e9c95f..af2d970f3f2 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Point_d.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Point_d.h @@ -40,7 +40,7 @@ class Point_d : public Get_type::type typedef Point_d Self; - static_assert((std::is_same::type>::value)); + static_assert(std::is_same::type>::value); public: diff --git a/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Ref_count_obj.h b/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Ref_count_obj.h index 364a4184e96..097a41f9755 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Ref_count_obj.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Ref_count_obj.h @@ -33,7 +33,7 @@ class Ref_count_obj typedef typename Get_functor >::type CBase; typedef Ref_count_obj Self; - static_assert((std::is_same::type>::value)); + static_assert(std::is_same::type>::value); public: typedef R_ R; diff --git a/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Segment_d.h b/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Segment_d.h index a45ce922e12..c450300b587 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Segment_d.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Segment_d.h @@ -35,7 +35,7 @@ class Segment_d : public Get_type::type typedef typename Get_functor::type CSEBase; typedef Segment_d Self; - static_assert((std::is_same::type>::value)); + static_assert(std::is_same::type>::value); public: diff --git a/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Sphere_d.h b/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Sphere_d.h index 409c9b65e3f..611217e9acd 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Sphere_d.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Sphere_d.h @@ -32,7 +32,7 @@ class Sphere_d : public Get_type::type typedef typename Get_functor::type SRBase; typedef Sphere_d Self; - static_assert((std::is_same::type>::value)); + static_assert(std::is_same::type>::value); public: diff --git a/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Vector_d.h b/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Vector_d.h index 9593ef91bbc..1b150be0aae 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Vector_d.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/Wrapper/Vector_d.h @@ -39,7 +39,7 @@ class Vector_d : public Get_type::type typedef typename Get_functor::type SLBase; typedef Vector_d Self; - static_assert((std::is_same::type>::value)); + static_assert(std::is_same::type>::value); public: diff --git a/NewKernel_d/test/NewKernel_d/Epick_d.cpp b/NewKernel_d/test/NewKernel_d/Epick_d.cpp index 1e88061cbf1..18ac1657ee6 100644 --- a/NewKernel_d/test/NewKernel_d/Epick_d.cpp +++ b/NewKernel_d/test/NewKernel_d/Epick_d.cpp @@ -740,11 +740,11 @@ template struct CGAL::Epick_d; typedef CGAL::Epick_d > Ker2; typedef CGAL::Epick_d > Ker3; typedef CGAL::Epick_d Kerd; -static_assert((std::is_same,Ker2::Dimension>::value)); -static_assert((std::is_same,Ker3::Dimension>::value)); -static_assert((std::is_same::value)); -static_assert((std::is_same,CGAL::Ambient_dimension::type>::value)); -static_assert((std::is_same,CGAL::Ambient_dimension::type>::value)); +static_assert(std::is_same,Ker2::Dimension>::value); +static_assert(std::is_same,Ker3::Dimension>::value); +static_assert(std::is_same::value); +static_assert(std::is_same,CGAL::Ambient_dimension::type>::value); +static_assert(std::is_same,CGAL::Ambient_dimension::type>::value); int main(){ //Broken with Linear_base_d (output iterator) //test2 >(); diff --git a/Number_types/include/CGAL/Lazy_exact_nt.h b/Number_types/include/CGAL/Lazy_exact_nt.h index be91713a674..0bca67f5c93 100644 --- a/Number_types/include/CGAL/Lazy_exact_nt.h +++ b/Number_types/include/CGAL/Lazy_exact_nt.h @@ -944,9 +944,9 @@ struct Div_mod_selector { void operator()( const NT1& x, const NT2& y, NT& q, NT& r ) const { - static_assert((::std::is_same< + static_assert(::std::is_same< typename Coercion_traits< NT1, NT2 >::Type, NT - >::value)); + >::value); typename Coercion_traits< NT1, NT2 >::Cast cast; operator()( cast(x), cast(y), q, r ); @@ -1029,8 +1029,8 @@ template < typename ET > class Real_embeddable_traits< Lazy_exact_nt > : public INTERN_RET::Real_embeddable_traits_base< Lazy_exact_nt , CGAL::Tag_true > { // Every type ET of Lazy_exact_nt has to be real embeddable. - static_assert((::std::is_same< typename Real_embeddable_traits< ET > - ::Is_real_embeddable, Tag_true >::value)); + static_assert(::std::is_same< typename Real_embeddable_traits< ET > + ::Is_real_embeddable, Tag_true >::value); public: typedef Lazy_exact_nt Type; diff --git a/Number_types/include/CGAL/Root_of_traits.h b/Number_types/include/CGAL/Root_of_traits.h index c014e667293..32d81e481a9 100644 --- a/Number_types/include/CGAL/Root_of_traits.h +++ b/Number_types/include/CGAL/Root_of_traits.h @@ -150,7 +150,7 @@ private: // We have the typedef as VC10 fails with // static_assert(FrT::Is_fraction::value) typedef typename FrT::Is_fraction ISF; - static_assert((ISF::value)); + static_assert(ISF::value); typedef typename FrT::Numerator_type RT; diff --git a/Number_types/include/CGAL/Test/test_root_of_traits.h b/Number_types/include/CGAL/Test/test_root_of_traits.h index 23f4b5dafc7..58c1340335f 100644 --- a/Number_types/include/CGAL/Test/test_root_of_traits.h +++ b/Number_types/include/CGAL/Test/test_root_of_traits.h @@ -28,8 +28,8 @@ void test_root_of_traits(){ typedef typename RoT::Root_of_1 Root_of_1; typedef typename RoT::Root_of_2 Root_of_2; - static_assert((::std::is_same::value)); - static_assert((::std::is_same::value)); + static_assert(::std::is_same::value); + static_assert(::std::is_same::value); typedef typename RoT::Make_root_of_2 Make_root_of_2; typedef typename RoT::Make_sqrt Make_sqrt; @@ -41,10 +41,10 @@ void test_root_of_traits(){ const Inverse& inverse = Inverse(); const Square& square = Square(); - static_assert((::std::is_same::value)); - static_assert((::std::is_same::value)); - static_assert((::std::is_same::value)); - static_assert((::std::is_same::value)); + static_assert(::std::is_same::value); + static_assert(::std::is_same::value); + static_assert(::std::is_same::value); + static_assert(::std::is_same::value); { diff --git a/Number_types/include/CGAL/simplest_rational_in_interval.h b/Number_types/include/CGAL/simplest_rational_in_interval.h index a93bcc855b4..fbb5206ffbe 100644 --- a/Number_types/include/CGAL/simplest_rational_in_interval.h +++ b/Number_types/include/CGAL/simplest_rational_in_interval.h @@ -43,10 +43,10 @@ simplest_rational_in_interval(double x, double y) { // Must be a fraction CGAL_USE_TYPE(Is_fraction); - static_assert((::std::is_same::value)); + static_assert(::std::is_same::value); // Numerator_type,Denominator_type must be the same CGAL_USE_TYPE(Denominator_type); - static_assert((::std::is_same::value)); + static_assert(::std::is_same::value); if(x == y){ diff --git a/Number_types/include/CGAL/to_rational.h b/Number_types/include/CGAL/to_rational.h index d60f56b3eb2..3ce75dd8032 100644 --- a/Number_types/include/CGAL/to_rational.h +++ b/Number_types/include/CGAL/to_rational.h @@ -34,9 +34,9 @@ to_rational(double x) typedef typename FT::Denominator_type Denominator_type; typename FT::Compose compose; - static_assert((::std::is_same::value)); + static_assert(::std::is_same::value); CGAL_USE_TYPE(Is_fraction); - static_assert((::std::is_same::value)); + static_assert(::std::is_same::value); CGAL_USE_TYPE(Denominator_type); Numerator_type num(0),den(1); diff --git a/Number_types/test/Number_types/Lazy_exact_nt_new.cpp b/Number_types/test/Number_types/Lazy_exact_nt_new.cpp index f80b17bc1ba..fffb0108143 100644 --- a/Number_types/test/Number_types/Lazy_exact_nt_new.cpp +++ b/Number_types/test/Number_types/Lazy_exact_nt_new.cpp @@ -81,9 +81,9 @@ void test_lazy_exact_nt() { typedef CGAL::Lazy_exact_nt< typename AK::Integer > LI; typedef CGAL::Lazy_exact_nt< typename AK::Rational > LR; typedef CGAL::Coercion_traits CT; - static_assert((std::is_same< typename CT::Are_implicit_interoperable,CGAL::Tag_true>::value)); - static_assert((std::is_same< typename CT::Are_explicit_interoperable,CGAL::Tag_true>::value)); - static_assert((std::is_same< typename CT::Type,LR>::value)); + static_assert(std::is_same< typename CT::Are_implicit_interoperable,CGAL::Tag_true>::value); + static_assert(std::is_same< typename CT::Are_explicit_interoperable,CGAL::Tag_true>::value); + static_assert(std::is_same< typename CT::Type,LR>::value); LI i(4); LR r(4); @@ -99,8 +99,8 @@ void test_lazy_exact_nt() { typedef CGAL::Lazy_exact_nt T1; typedef CGAL::Lazy_exact_nt T2; typedef CGAL::Coercion_traits CT; - static_assert((std::is_same< typename CT::Are_implicit_interoperable,CGAL::Tag_false>::value)); - static_assert((std::is_same< typename CT::Are_explicit_interoperable,CGAL::Tag_false>::value)); + static_assert(std::is_same< typename CT::Are_implicit_interoperable,CGAL::Tag_false>::value); + static_assert(std::is_same< typename CT::Are_explicit_interoperable,CGAL::Tag_false>::value); #endif #endif } diff --git a/Number_types/test/Number_types/Quotient_new.cpp b/Number_types/test/Number_types/Quotient_new.cpp index 079ea8fbc02..dfa2c37da05 100644 --- a/Number_types/test/Number_types/Quotient_new.cpp +++ b/Number_types/test/Number_types/Quotient_new.cpp @@ -62,9 +62,9 @@ void test_quotient() { typedef CGAL::Quotient QI; typedef CGAL::Coercion_traits CT; CGAL_USE_TYPE(CT); - static_assert((std::is_same< typename CT::Are_explicit_interoperable,CGAL::Tag_true>::value)); - static_assert((std::is_same< typename CT::Are_implicit_interoperable,CGAL::Tag_true>::value)); - static_assert((std::is_same< typename CT::Type,QI>::value)); + static_assert(std::is_same< typename CT::Are_explicit_interoperable,CGAL::Tag_true>::value); + static_assert(std::is_same< typename CT::Are_implicit_interoperable,CGAL::Tag_true>::value); + static_assert(std::is_same< typename CT::Type,QI>::value); } } diff --git a/Number_types/test/Number_types/Sqrt_extension.h b/Number_types/test/Number_types/Sqrt_extension.h index 547aaf10ab9..825ba19d252 100644 --- a/Number_types/test/Number_types/Sqrt_extension.h +++ b/Number_types/test/Number_types/Sqrt_extension.h @@ -24,7 +24,7 @@ void convert_to(const NT& x, RT& r){ typedef CGAL::Coercion_traits CT; typedef typename CT::Type Type; CGAL_USE_TYPE(Type); - static_assert((::std::is_same::value)); + static_assert(::std::is_same::value); r = typename CT::Cast()(x); } } //namespace CGAL @@ -700,17 +700,17 @@ void test_get_arithmetic_kernel(){ typedef CGAL::Sqrt_extension EXT; typedef typename CGAL::Get_arithmetic_kernel::Arithmetic_kernel AT_; CGAL_USE_TYPE(AT_); - static_assert((std::is_same::value)); + static_assert(std::is_same::value); } { typedef CGAL::Sqrt_extension EXT; typedef typename CGAL::Get_arithmetic_kernel::Arithmetic_kernel AT_; CGAL_USE_TYPE(AT_); - static_assert((std::is_same::value)); + static_assert(std::is_same::value); } { typedef CGAL::Sqrt_extension EXT; typedef typename CGAL::Get_arithmetic_kernel::Arithmetic_kernel AT_; CGAL_USE_TYPE(AT_); - static_assert((std::is_same::value)); + static_assert(std::is_same::value); } } diff --git a/Number_types/test/Number_types/include/CGAL/Test/test_root_of_2_traits.h b/Number_types/test/Number_types/include/CGAL/Test/test_root_of_2_traits.h index fddad986534..2ffb9133345 100644 --- a/Number_types/test/Number_types/include/CGAL/Test/test_root_of_2_traits.h +++ b/Number_types/test/Number_types/include/CGAL/Test/test_root_of_2_traits.h @@ -7,12 +7,12 @@ void test_root_of_traits(){ typedef typename RoT::Root_of_1 Root_of_1; typedef typename RoT::Root_of_2 Root_of_2; - static_assert((::std::is_same::value)); - static_assert((::std::is_same::value)); + static_assert(::std::is_same::value); + static_assert(::std::is_same::value); typedef typename RoT::Make_root_of_2 Make_root_of_2; typedef typename Make_root_of_2::result_type result_type; - static_assert((::std::is_same::value)); + static_assert(::std::is_same::value); const Make_root_of_2& make_root_of_2 = Make_root_of_2(); Root_of_2 r = make_root_of_2(T(0),T(-1),T(2)); //-sqrt(2) diff --git a/Optimal_bounding_box/include/CGAL/Optimal_bounding_box/internal/optimize_2.h b/Optimal_bounding_box/include/CGAL/Optimal_bounding_box/internal/optimize_2.h index c4ce9993cf0..ae450d781e8 100644 --- a/Optimal_bounding_box/include/CGAL/Optimal_bounding_box/internal/optimize_2.h +++ b/Optimal_bounding_box/include/CGAL/Optimal_bounding_box/internal/optimize_2.h @@ -119,7 +119,7 @@ void optimize_along_OBB_axes(typename Traits::Matrix& rot, typedef typename Traits::Matrix Matrix; typedef typename Traits::Vector Vector; - static_assert((std::is_same::type, Point>::value)); + static_assert(std::is_same::type, Point>::value); std::vector rotated_points; rotated_points.reserve(points.size()); diff --git a/Optimal_bounding_box/include/CGAL/Optimal_bounding_box/oriented_bounding_box.h b/Optimal_bounding_box/include/CGAL/Optimal_bounding_box/oriented_bounding_box.h index 0e59be50310..d64b73e699b 100644 --- a/Optimal_bounding_box/include/CGAL/Optimal_bounding_box/oriented_bounding_box.h +++ b/Optimal_bounding_box/include/CGAL/Optimal_bounding_box/oriented_bounding_box.h @@ -202,7 +202,7 @@ void construct_oriented_bounding_box(const PointRange& points, { typedef typename Traits::Point_3 Point; - static_assert((std::is_same::type, Point>::value)); + static_assert(std::is_same::type, Point>::value); if(use_ch) // construct the convex hull to reduce the number of points { diff --git a/Point_set_processing_3/include/CGAL/OpenGR/compute_registration_transformation.h b/Point_set_processing_3/include/CGAL/OpenGR/compute_registration_transformation.h index 43bf9c7db42..229ceab85ff 100644 --- a/Point_set_processing_3/include/CGAL/OpenGR/compute_registration_transformation.h +++ b/Point_set_processing_3/include/CGAL/OpenGR/compute_registration_transformation.h @@ -309,14 +309,14 @@ compute_registration_transformation (const PointRange1& point_set_1, const Point typedef Point_set_processing_3_np_helper NP_helper2; typedef typename NP_helper1::Const_point_map PointMap1; typedef typename NP_helper2::Const_point_map PointMap2; - static_assert((std::is_same< typename boost::property_traits::value_type, - typename boost::property_traits::value_type> ::value), + static_assert(std::is_same< typename boost::property_traits::value_type, + typename boost::property_traits::value_type> ::value, "The point type of input ranges must be the same"); typedef typename NP_helper1::Normal_map NormalMap1; typedef typename NP_helper2::Normal_map NormalMap2; - static_assert((std::is_same< typename boost::property_traits::value_type, - typename boost::property_traits::value_type> ::value), + static_assert(std::is_same< typename boost::property_traits::value_type, + typename boost::property_traits::value_type> ::value, "The vector type of input ranges must be the same"); typedef typename NP_helper1::Geom_traits Kernel; diff --git a/Point_set_processing_3/include/CGAL/OpenGR/register_point_sets.h b/Point_set_processing_3/include/CGAL/OpenGR/register_point_sets.h index 08012fe3397..5f45ba40acb 100644 --- a/Point_set_processing_3/include/CGAL/OpenGR/register_point_sets.h +++ b/Point_set_processing_3/include/CGAL/OpenGR/register_point_sets.h @@ -222,14 +222,14 @@ register_point_sets (const PointRange1& point_set_1, PointRange2& point_set_2, typedef Point_set_processing_3_np_helper NP_helper2; typedef typename NP_helper1::Const_point_map PointMap1; typedef typename NP_helper2::Const_point_map PointMap2; - static_assert((std::is_same< typename boost::property_traits::value_type, - typename boost::property_traits::value_type> ::value), + static_assert(std::is_same< typename boost::property_traits::value_type, + typename boost::property_traits::value_type> ::value, "The point type of input ranges must be the same"); typedef typename NP_helper1::Normal_map NormalMap1; typedef typename NP_helper2::Normal_map NormalMap2; - static_assert((std::is_same< typename boost::property_traits::value_type, - typename boost::property_traits::value_type> ::value), + static_assert(std::is_same< typename boost::property_traits::value_type, + typename boost::property_traits::value_type> ::value, "The vector type of input ranges must be the same"); typedef typename NP_helper1::Geom_traits Kernel; diff --git a/Point_set_processing_3/include/CGAL/pointmatcher/compute_registration_transformation.h b/Point_set_processing_3/include/CGAL/pointmatcher/compute_registration_transformation.h index cb47b1a69c1..6130aadaaf1 100644 --- a/Point_set_processing_3/include/CGAL/pointmatcher/compute_registration_transformation.h +++ b/Point_set_processing_3/include/CGAL/pointmatcher/compute_registration_transformation.h @@ -607,14 +607,14 @@ compute_registration_transformation (const PointRange1& point_set_1, const Point // property map types typedef typename NP_helper1::Const_point_map PointMap1; typedef typename NP_helper2::Const_point_map PointMap2; - static_assert((std::is_same< typename boost::property_traits::value_type, - typename boost::property_traits::value_type> ::value), + static_assert(std::is_same< typename boost::property_traits::value_type, + typename boost::property_traits::value_type> ::value, "The point type of input ranges must be the same"); typedef typename NP_helper1::Normal_map NormalMap1; typedef typename NP_helper2::Normal_map NormalMap2; - static_assert((std::is_same< typename boost::property_traits::value_type, - typename boost::property_traits::value_type> ::value), + static_assert(std::is_same< typename boost::property_traits::value_type, + typename boost::property_traits::value_type> ::value, "The vector type of input ranges must be the same"); typedef typename std::iterator_traits::value_type key_type1; @@ -630,8 +630,8 @@ compute_registration_transformation (const PointRange1& point_set_1, const Point NormalMap2 normal_map2 = NP_helper2::get_normal_map(point_set_2, np2); auto weight_map2 = choose_parameter(get_parameter(np2, internal_np::scalar_map), DefaultWeightMap2(Scalar(1))); - static_assert((std::is_same< typename boost::property_traits::value_type, - typename boost::property_traits::value_type> ::value), + static_assert(std::is_same< typename boost::property_traits::value_type, + typename boost::property_traits::value_type> ::value, "The scalar type of input ranges must be the same"); // initial transformation diff --git a/Point_set_processing_3/include/CGAL/structure_point_set.h b/Point_set_processing_3/include/CGAL/structure_point_set.h index 58b3cbee86d..0b517436394 100644 --- a/Point_set_processing_3/include/CGAL/structure_point_set.h +++ b/Point_set_processing_3/include/CGAL/structure_point_set.h @@ -234,7 +234,7 @@ public: typedef typename Point_set_processing_3::GetPlaneIndexMap::type PlaneIndexMap; CGAL_assertion_msg(NP_helper::has_normal_map(points, np), "Error: no normal map"); - static_assert((!is_default_parameter::value), + static_assert(!is_default_parameter::value, "Error: no plane index map"); PointMap point_map = NP_helper::get_const_point_map(points, np); diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/clip.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/clip.h index 691ddfa6a3b..988e6c3a7ee 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/clip.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/clip.h @@ -444,8 +444,8 @@ generic_clip_impl( typedef typename GetVertexPointMap::type Vpm2; - static_assert((std::is_same::value_type, - typename boost::property_traits::value_type>::value)); + static_assert(std::is_same::value_type, + typename boost::property_traits::value_type>::value); Vpm vpm1 = choose_parameter(get_parameter(np1, internal_np::vertex_point), get_property_map(boost::vertex_point, tm1)); diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/connected_components.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/connected_components.h index 991c4b33c4b..bffa8e6dca1 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/connected_components.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/connected_components.h @@ -553,7 +553,7 @@ std::size_t keep_large_connected_components(PolygonMesh& pmesh, >::type FaceSizeMap; typedef typename boost::property_traits::value_type Face_size; - static_assert((std::is_convertible::value)); + static_assert(std::is_convertible::value); typedef typename internal_np::Lookup_named_param_def::type VPM1; typedef typename GetVertexPointMap::type VPM2; - static_assert((std::is_same::value_type, - typename boost::property_traits::value_type>::value)); + static_assert(std::is_same::value_type, + typename boost::property_traits::value_type>::value); VPM1 vpm1 = choose_parameter(get_parameter(np1, internal_np::vertex_point), get_property_map(boost::vertex_point, tm1)); @@ -694,8 +694,8 @@ corefine( TriangleMesh& tm1, typedef typename GetVertexPointMap::type VPM1; typedef typename GetVertexPointMap::type VPM2; - static_assert((std::is_same::value_type, - typename boost::property_traits::value_type>::value)); + static_assert(std::is_same::value_type, + typename boost::property_traits::value_type>::value); VPM1 vpm1 = choose_parameter(get_parameter(np1, internal_np::vertex_point), get_property_map(boost::vertex_point, tm1)); diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/distance.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/distance.h index 6d221c77bb9..21024ad5c04 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/distance.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/distance.h @@ -1037,7 +1037,7 @@ sample_triangle_soup(const PointRange& points, typedef typename PointRange::value_type Point_3; typedef typename Kernel_traits::Kernel GeomTraits; - static_assert((std::is_same::value), "Wrong point type."); + static_assert(std::is_same::value, "Wrong point type."); CGAL_precondition(!triangles.empty()); diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersect_triangle_and_segment_3.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersect_triangle_and_segment_3.h index aaf34efd11d..652d0b09952 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersect_triangle_and_segment_3.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersect_triangle_and_segment_3.h @@ -98,7 +98,7 @@ intersection_type( typedef typename boost::property_traits::value_type Point_3; typedef typename Kernel_traits::Kernel Kernel; - static_assert((std::is_same::value_type>::value)); + static_assert(std::is_same::value_type>::value); halfedge_descriptor h_2=halfedge(f_2,tm2); diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_nodes.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_nodes.h index 81f3ca6478d..38f137cad01 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_nodes.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_nodes.h @@ -49,8 +49,8 @@ public: private: //typedefs typedef typename boost::property_traits::value_type Point_3; - static_assert((std::is_same::value_type, - typename boost::property_traits::value_type>::value)); + static_assert(std::is_same::value_type, + typename boost::property_traits::value_type>::value); typedef typename Kernel_traits::Kernel Input_kernel; typedef std::vector Nodes_vector; @@ -151,8 +151,8 @@ public: private: typedef typename boost::property_traits::value_type Point_3; - static_assert((std::is_same::value_type, - typename boost::property_traits::value_type>::value)); + static_assert(std::is_same::value_type, + typename boost::property_traits::value_type>::value); typedef typename Kernel_traits::Kernel Input_kernel; @@ -328,8 +328,8 @@ class Intersection_nodes::value_type Point_3; - static_assert((std::is_same::value_type, - typename boost::property_traits::value_type>::value)); + static_assert(std::is_same::value_type, + typename boost::property_traits::value_type>::value); typedef typename Kernel_traits::Kernel Input_kernel; typedef std::vector Nodes_vector; diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_of_coplanar_triangles_3.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_of_coplanar_triangles_3.h index 7929697aec2..b2047d2627e 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_of_coplanar_triangles_3.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_of_coplanar_triangles_3.h @@ -32,8 +32,8 @@ struct Intersect_coplanar_faces_3 // typedefs typedef typename boost::property_traits::value_type Point; - static_assert((std::is_same::value_type, - typename boost::property_traits::value_type>::value)); + static_assert(std::is_same::value_type, + typename boost::property_traits::value_type>::value); typedef typename CGAL::Kernel_traits::Kernel Input_kernel; diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Snapping/snap_vertices.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Snapping/snap_vertices.h index 9a724ee2a4a..5adbf99ff6f 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Snapping/snap_vertices.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Snapping/snap_vertices.h @@ -730,7 +730,7 @@ std::size_t snap_vertices_two_way(const HalfedgeRange_A& halfedge_range_A, using parameters::get_parameter; using parameters::get_parameter_reference; - static_assert((std::is_same::value)); + static_assert(std::is_same::value); GT gt = choose_parameter(get_parameter(np_A, internal_np::geom_traits)); VPM_A vpm_A = choose_parameter(get_parameter(np_A, internal_np::vertex_point), diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/intersection.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/intersection.h index 4f66b558cc7..d4fc6d730e4 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/intersection.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/intersection.h @@ -681,7 +681,7 @@ compute_face_polylines_intersection(const FaceRange& face_range, get_const_property_map(boost::vertex_point, tm)); typedef typename boost::property_traits::value_type Point; typedef typename boost::range_value::type Polyline; - static_assert((std::is_same::type>::value)); + static_assert(std::is_same::type>::value); std::vector faces; faces.reserve(std::distance( boost::begin(face_range), boost::end(face_range) )); @@ -1742,8 +1742,8 @@ surface_intersection(const TriangleMesh& tm1, typedef typename GetVertexPointMap::const_type VPM1; typedef typename GetVertexPointMap::const_type VPM2; - static_assert((std::is_same::value_type, - typename boost::property_traits::value_type>::value)); + static_assert(std::is_same::value_type, + typename boost::property_traits::value_type>::value); VPM1 vpm1 = parameters::choose_parameter(parameters::get_parameter(np1, internal_np::vertex_point), get_const_property_map(CGAL::vertex_point, tm1)); diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/locate.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/locate.h index 3f1a6650872..26d0266e03a 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/locate.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/locate.h @@ -1661,7 +1661,7 @@ locate_with_AABB_tree(const typename internal::Location_traits AABB_traits; typedef typename Primitive::Point Point_3; - static_assert((std::is_same::value)); + static_assert(std::is_same::value); typedef typename GetVertexPointMap::const_type VertexPointMap; typedef internal::Point_to_Point_3_VPM WrappedVPM; @@ -1754,7 +1754,7 @@ locate(const typename internal::Location_traits:: using parameters::get_parameter; using parameters::choose_parameter; - static_assert((std::is_same::value)); + static_assert(std::is_same::value); const VertexPointMap vpm = parameters::choose_parameter(parameters::get_parameter(np, internal_np::vertex_point), get_const_property_map(boost::vertex_point, tm)); diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h index 8e4f54ed5a1..8f1c60347ee 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h @@ -989,8 +989,8 @@ void match_faces(const PolygonMesh1& m1, get_const_property_map(vertex_point, m1)); const VPMap2 vpm2 = choose_parameter(get_parameter(np2, internal_np::vertex_point), get_const_property_map(vertex_point, m2)); - static_assert((std::is_same::value_type, - typename boost::property_traits::value_type>::value), + static_assert(std::is_same::value_type, + typename boost::property_traits::value_type>::value, "Both vertex point maps must have the same point type."); const VIMap1 vim1 = get_initialized_vertex_index_map(m1, np1); diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/orient_polygon_soup_extension.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/orient_polygon_soup_extension.h index e395080f4a7..a7e9cf2480a 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/orient_polygon_soup_extension.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/orient_polygon_soup_extension.h @@ -159,7 +159,7 @@ void orient_triangle_soup_with_reference_triangle_soup(const ReferencePointRange typedef typename boost::property_traits::reference PM2_Point_ref; typedef typename boost::property_traits::value_type Point_3; - static_assert((std::is_same::value_type>::value)); + static_assert(std::is_same::value_type>::value); typedef typename CGAL::Kernel_traits::Kernel K; typedef typename K::Triangle_3 Triangle; @@ -309,7 +309,7 @@ void orient_triangle_soup_with_reference_triangle_mesh(const TriangleMesh& tm_re PointMap point_map = NP_helper::get_const_point_map(points, np2); - static_assert((std::is_same::value_type>::value)); + static_assert(std::is_same::value_type>::value); K k = choose_parameter(get_parameter(np1, internal_np::geom_traits)); diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/polygon_mesh_to_polygon_soup.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/polygon_mesh_to_polygon_soup.h index f247b361f43..eed98878632 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/polygon_mesh_to_polygon_soup.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/polygon_mesh_to_polygon_soup.h @@ -39,7 +39,7 @@ struct PM_to_PS_point_converter { PS_Point operator()(const PM_Point& p) const { - static_assert((std::is_convertible::value)); + static_assert(std::is_convertible::value); return PS_Point(p); } }; diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/polygon_soup_to_polygon_mesh.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/polygon_soup_to_polygon_mesh.h index cc1d299702f..df32555bc53 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/polygon_soup_to_polygon_mesh.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/polygon_soup_to_polygon_mesh.h @@ -43,7 +43,7 @@ namespace internal { template PM_Point convert_to_pm_point(const PS_Point& p) { - static_assert((std::is_convertible::value)); + static_assert(std::is_convertible::value); return PM_Point(p); } diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_self_intersections.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_self_intersections.h index 9d4f5837d8e..3a5f9fca82f 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_self_intersections.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_self_intersections.h @@ -178,7 +178,7 @@ FaceOutputIterator replace_faces_with_patch(const std::vector::value_type, Point>::value)); + static_assert(std::is_same::value_type, Point>::value); typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; diff --git a/Polygon_mesh_processing/include/CGAL/Rigid_triangle_mesh_collision_detection.h b/Polygon_mesh_processing/include/CGAL/Rigid_triangle_mesh_collision_detection.h index 3ed4b89f06e..761ca6ec9bf 100644 --- a/Polygon_mesh_processing/include/CGAL/Rigid_triangle_mesh_collision_detection.h +++ b/Polygon_mesh_processing/include/CGAL/Rigid_triangle_mesh_collision_detection.h @@ -250,7 +250,7 @@ public: { // handle vpm typedef typename CGAL::GetVertexPointMap::const_type Local_vpm; - static_assert( (std::is_same::value) ); + static_assert(std::is_same::value); Vpm vpm = parameters::choose_parameter(parameters::get_parameter(np, internal_np::vertex_point), @@ -562,7 +562,7 @@ public: parameters::get_parameter(np, internal_np::apply_per_connected_component), true); typedef typename CGAL::GetVertexPointMap::const_type Local_vpm; - static_assert((std::is_same::value)); + static_assert(std::is_same::value); Vpm vpm = parameters::choose_parameter(parameters::get_parameter(np, internal_np::vertex_point), diff --git a/Polygon_mesh_processing/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Polyhedral_envelope_filter.h b/Polygon_mesh_processing/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Polyhedral_envelope_filter.h index c12178a1b9c..458fc0a703c 100644 --- a/Polygon_mesh_processing/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Polyhedral_envelope_filter.h +++ b/Polygon_mesh_processing/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Polyhedral_envelope_filter.h @@ -58,7 +58,7 @@ private: template void initialize_envelope(const Profile& profile) const { - static_assert((std::is_same::value)); + static_assert(std::is_same::value); typedef typename Profile::Triangle_mesh Triangle_mesh; typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_locate.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_locate.cpp index 8aeaab049db..60c14ec9604 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_locate.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_locate.cpp @@ -522,7 +522,7 @@ struct Locate_with_AABB_tree_Tester // 2D case typedef CGAL::AABB_face_graph_triangle_primitive AABB_face_graph_primitive; typedef CGAL::AABB_traits AABB_face_graph_traits; - static_assert((std::is_same::value)); + static_assert(std::is_same::value); Intrinsic_point_to_Point_3 to_p3; @@ -633,7 +633,7 @@ struct Locate_with_AABB_tree_Tester // 3D typedef CGAL::AABB_traits AABB_face_graph_traits; typedef typename K::Point_3 Point_3; - static_assert((std::is_same::value)); + static_assert(std::is_same::value); CGAL::AABB_tree tree_a; Point_reference p3_a = get(vpm, v); diff --git a/Polynomial/include/CGAL/Exponent_vector.h b/Polynomial/include/CGAL/Exponent_vector.h index 826a9417ffd..1a06965514d 100644 --- a/Polynomial/include/CGAL/Exponent_vector.h +++ b/Polynomial/include/CGAL/Exponent_vector.h @@ -59,7 +59,7 @@ public: :v(begin,end){ typedef typename std::iterator_traits::value_type value_type; CGAL_USE_TYPE(value_type); - static_assert(( ::std::is_same::value)); + static_assert(::std::is_same::value); } diff --git a/Polynomial/include/CGAL/Polynomial/Algebraic_structure_traits.h b/Polynomial/include/CGAL/Polynomial/Algebraic_structure_traits.h index d75f6f291d5..f989b8ff201 100644 --- a/Polynomial/include/CGAL/Polynomial/Algebraic_structure_traits.h +++ b/Polynomial/include/CGAL/Polynomial/Algebraic_structure_traits.h @@ -273,9 +273,9 @@ class Polynomial_algebraic_structure_traits_base< POLY, Field_tag > template < class NT1, class NT2 > void operator()( const NT1& x, const NT2& y, POLY& q, POLY& r ) const { - static_assert((::std::is_same< + static_assert(::std::is_same< typename Coercion_traits< NT1, NT2 >::Type, POLY - >::value)); + >::value); typename Coercion_traits< NT1, NT2 >::Cast cast; operator()( cast(x), cast(y), q, r ); diff --git a/Polynomial/include/CGAL/Polynomial/Polynomial_type.h b/Polynomial/include/CGAL/Polynomial/Polynomial_type.h index 9c2c27b6fc7..e2529d2e349 100644 --- a/Polynomial/include/CGAL/Polynomial/Polynomial_type.h +++ b/Polynomial/include/CGAL/Polynomial/Polynomial_type.h @@ -545,8 +545,8 @@ public: * Also available as non-member function. */ CGAL::Sign sign() const { -// static_assert( (std::is_same< typename Real_embeddable_traits::Is_real_embeddable, -// CGAL::Tag_true>::value) ); +// static_assert(std::is_same< typename Real_embeddable_traits::Is_real_embeddable, +// CGAL::Tag_true>::value); return CGAL::sign(lcoeff()); } diff --git a/Polynomial/include/CGAL/Polynomial_traits_d.h b/Polynomial/include/CGAL/Polynomial_traits_d.h index 1a377fc5c17..f7a4d3993e3 100644 --- a/Polynomial/include/CGAL/Polynomial_traits_d.h +++ b/Polynomial/include/CGAL/Polynomial_traits_d.h @@ -566,7 +566,7 @@ public: template Polynomial_d construct_value_type(Input_iterator begin, Input_iterator end, NT) const { typedef CGAL::Coercion_traits CT; - static_assert((std::is_same::value)); + static_assert(std::is_same::value); typename CT::Cast cast; return Polynomial_d( boost::make_transform_iterator(begin,cast), diff --git a/Polynomial/include/CGAL/Test/_test_polynomial_traits_d.h b/Polynomial/include/CGAL/Test/_test_polynomial_traits_d.h index 7547bd30281..b40a6d882f7 100644 --- a/Polynomial/include/CGAL/Test/_test_polynomial_traits_d.h +++ b/Polynomial/include/CGAL/Test/_test_polynomial_traits_d.h @@ -50,7 +50,7 @@ static CGAL::Random my_rnd(346); // some seed #define ASSERT_IS_NULL_FUNCTOR(T) \ - static_assert((std::is_same::value)) + static_assert(std::is_same::value) @@ -1802,23 +1802,23 @@ void test_rebind(const PT& /*traits*/){ { typedef typename PT:: template Rebind::Other PT_IC_1; CGAL_USE_TYPE(PT_IC_1); - static_assert((std::is_same< typename PT_IC_1::Innermost_coefficient_type, - IC>::value)); - static_assert((PT_IC_1::d==1)); + static_assert(std::is_same< typename PT_IC_1::Innermost_coefficient_type, + IC>::value); + static_assert(PT_IC_1::d==1); } { typedef typename PT:: template Rebind::Other PT_IC_2; CGAL_USE_TYPE(PT_IC_2); - static_assert((std::is_same< typename PT_IC_2::Innermost_coefficient_type, - IC>::value)); - static_assert((PT_IC_2::d==2)); + static_assert(std::is_same< typename PT_IC_2::Innermost_coefficient_type, + IC>::value); + static_assert(PT_IC_2::d==2); } { typedef typename PT:: template Rebind::Other PT_IC_3; CGAL_USE_TYPE(PT_IC_3); - static_assert((std::is_same< typename PT_IC_3::Innermost_coefficient_type, - IC>::value)); - static_assert((PT_IC_3::d==3)); + static_assert(std::is_same< typename PT_IC_3::Innermost_coefficient_type, + IC>::value); + static_assert(PT_IC_3::d==3); } { typedef typename PT:: template Rebind::Other PT_IC_1; @@ -1831,12 +1831,12 @@ void test_rebind(const PT& /*traits*/){ typedef typename PT_IC_1::Polynomial_d Poly1; typedef typename PT_IC_2::Polynomial_d Poly2; - static_assert((std::is_same< typename PT_IC_1::Coefficient_type, - IC>::value)); - static_assert((std::is_same< typename PT_IC_2::Coefficient_type, - Poly1>::value)); - static_assert((std::is_same< typename PT_IC_3::Coefficient_type, - Poly2>::value)); + static_assert(std::is_same< typename PT_IC_1::Coefficient_type, + IC>::value); + static_assert(std::is_same< typename PT_IC_2::Coefficient_type, + Poly1>::value); + static_assert(std::is_same< typename PT_IC_3::Coefficient_type, + Poly2>::value); } @@ -1850,12 +1850,12 @@ void test_rebind(const PT& /*traits*/){ CGAL_USE_TYPE(PT_Integer_4); typedef typename PT:: template Rebind::Other PT_Rational_4; CGAL_USE_TYPE(PT_Rational_4); - static_assert((std::is_same< typename PT_Integer_4::Innermost_coefficient_type, - Integer>::value)); - static_assert((std::is_same< typename PT_Rational_4::Innermost_coefficient_type, - Rational>::value)); - static_assert((PT_Integer_4::d==dimension)); - static_assert((PT_Rational_4::d==dimension)); + static_assert(std::is_same< typename PT_Integer_4::Innermost_coefficient_type, + Integer>::value); + static_assert(std::is_same< typename PT_Rational_4::Innermost_coefficient_type, + Rational>::value); + static_assert(PT_Integer_4::d==dimension); + static_assert(PT_Rational_4::d==dimension); } #endif #ifdef CGAL_USE_CORE @@ -1867,12 +1867,12 @@ void test_rebind(const PT& /*traits*/){ typedef typename PT:: template Rebind::Other PT_Rational_4; CGAL_USE_TYPE(PT_Integer_4); CGAL_USE_TYPE(PT_Rational_4); - static_assert((std::is_same< typename PT_Integer_4::Innermost_coefficient_type, - Integer>::value)); - static_assert((std::is_same< typename PT_Rational_4::Innermost_coefficient_type, - Rational>::value)); - static_assert((PT_Integer_4::d==4)); - static_assert((PT_Rational_4::d==4)); + static_assert(std::is_same< typename PT_Integer_4::Innermost_coefficient_type, + Integer>::value); + static_assert(std::is_same< typename PT_Rational_4::Innermost_coefficient_type, + Rational>::value); + static_assert(PT_Integer_4::d==4); + static_assert(PT_Rational_4::d==4); } #endif { @@ -1880,12 +1880,12 @@ void test_rebind(const PT& /*traits*/){ typedef typename PT:: template Rebind::Other PT_Rational_4; CGAL_USE_TYPE(PT_Integer_4); CGAL_USE_TYPE(PT_Rational_4); - static_assert((std::is_same< typename PT_Integer_4::Innermost_coefficient_type, - int>::value)); - static_assert((std::is_same< typename PT_Rational_4::Innermost_coefficient_type, - double>::value)); - static_assert((PT_Integer_4::d==4)); - static_assert((PT_Rational_4::d==4)); + static_assert(std::is_same< typename PT_Integer_4::Innermost_coefficient_type, + int>::value); + static_assert(std::is_same< typename PT_Rational_4::Innermost_coefficient_type, + double>::value); + static_assert(PT_Integer_4::d==4); + static_assert(PT_Rational_4::d==4); } } diff --git a/Polynomial/test/Polynomial/Polynomial_type_generator.cpp b/Polynomial/test/Polynomial/Polynomial_type_generator.cpp index 56e11a39357..8d8497ed139 100644 --- a/Polynomial/test/Polynomial/Polynomial_type_generator.cpp +++ b/Polynomial/test/Polynomial/Polynomial_type_generator.cpp @@ -12,14 +12,14 @@ int main(){ { typedef CGAL::Polynomial_type_generator::Type Polynomial; - static_assert((::std::is_same::value)); + static_assert(::std::is_same::value); } { typedef CGAL::Polynomial_type_generator::Type Polynomial; - static_assert((::std::is_same::value)); + static_assert(::std::is_same::value); } { typedef CGAL::Polynomial_type_generator::Type Polynomial; - static_assert((::std::is_same::value)); + static_assert(::std::is_same::value); } } diff --git a/Polynomial/test/Polynomial/test_polynomial.h b/Polynomial/test/Polynomial/test_polynomial.h index 7cd7a2e17c2..c1943d96ae9 100644 --- a/Polynomial/test/Polynomial/test_polynomial.h +++ b/Polynomial/test/Polynomial/test_polynomial.h @@ -34,7 +34,7 @@ inline void convert_to(const NT& x, RT& r){ typedef CGAL::Coercion_traits CT; typedef typename CT::Coercion_type RET; - static_assert((::std::is_same::value)); + static_assert(::std::is_same::value); r = typename CT::Cast()(x); } } //namespace CGAL @@ -887,7 +887,7 @@ void test_scalar_factor_traits(){ typedef CGAL::Scalar_factor_traits SFT; typedef typename AT::Integer Scalar; typedef typename SFT::Scalar Scalar_; - static_assert((::std::is_same::value)); + static_assert(::std::is_same::value); typename SFT::Scalar_factor sfac; @@ -913,7 +913,7 @@ void test_scalar_factor_traits(){ typedef CGAL::Scalar_factor_traits SFT; typedef typename AT::Integer Scalar; typedef typename SFT::Scalar Scalar_; - static_assert((::std::is_same::value)); + static_assert(::std::is_same::value); typename SFT::Scalar_factor sfac; diff --git a/Polynomial/test/Polynomial/test_polynomial_Coercion_traits.cpp b/Polynomial/test/Polynomial/test_polynomial_Coercion_traits.cpp index d2ad9d2019c..ca30d9e8ed0 100644 --- a/Polynomial/test/Polynomial/test_polynomial_Coercion_traits.cpp +++ b/Polynomial/test/Polynomial/test_polynomial_Coercion_traits.cpp @@ -147,9 +147,9 @@ void test_coercion_traits(){ /* { typedef CGAL::Coercion_traits CT; - static_assert(( + static_assert( ::std::is_same< typename CT::Are_implicit_interoperable, - CGAL::Tag_false>::value)); + CGAL::Tag_false>::value); } */ diff --git a/Polynomial/test/Polynomial/test_polynomial_Get_arithmetic_kernel.cpp b/Polynomial/test/Polynomial/test_polynomial_Get_arithmetic_kernel.cpp index f52f33ae584..5edd4a40835 100644 --- a/Polynomial/test/Polynomial/test_polynomial_Get_arithmetic_kernel.cpp +++ b/Polynomial/test/Polynomial/test_polynomial_Get_arithmetic_kernel.cpp @@ -7,11 +7,11 @@ void test_get_arithmetic_kernel(){ { typedef CGAL::Polynomial POLY; typedef typename CGAL::Get_arithmetic_kernel::Arithmetic_kernel AK_; - static_assert((std::is_same::value)); + static_assert(std::is_same::value); }{ typedef CGAL::Polynomial > POLY; typedef typename CGAL::Get_arithmetic_kernel::Arithmetic_kernel AK_; - static_assert((std::is_same::value)); + static_assert(std::is_same::value); } } diff --git a/Ridges_3/include/CGAL/Ridges.h b/Ridges_3/include/CGAL/Ridges.h index 47fd6019ebd..d4052642864 100644 --- a/Ridges_3/include/CGAL/Ridges.h +++ b/Ridges_3/include/CGAL/Ridges.h @@ -190,10 +190,10 @@ class Ridge_approximation //requirements for the templates TriangleMesh and VertexFTMap or VertexVectorMap - static_assert((std::is_same::value)); - static_assert((std::is_same::value)); - static_assert((std::is_same::value)); - static_assert((std::is_same::value)); + static_assert(std::is_same::value); + static_assert(std::is_same::value); + static_assert(std::is_same::value); + static_assert(std::is_same::value); typedef std::pair< halfedge_descriptor, FT> Ridge_halfedge; typedef Ridge_halfedge Ridge_halfhedge; // kept for backward compatibility diff --git a/Ridges_3/include/CGAL/Umbilics.h b/Ridges_3/include/CGAL/Umbilics.h index 424708b2897..f815b9c18ca 100644 --- a/Ridges_3/include/CGAL/Umbilics.h +++ b/Ridges_3/include/CGAL/Umbilics.h @@ -110,10 +110,10 @@ class Umbilic_approximation typedef typename boost::graph_traits::vertex_iterator Vertex_const_iterator; //requirements for the templates TriangleMesh and VertexFTMap or VertexVectorMap - static_assert((std::is_same::value)); - static_assert((std::is_same::value)); - static_assert((std::is_same::value)); - static_assert((std::is_same::value)); + static_assert(std::is_same::value); + static_assert(std::is_same::value); + static_assert(std::is_same::value); + static_assert(std::is_same::value); typedef CGAL::Umbilic Umbilic; diff --git a/STL_Extension/include/CGAL/Handle_with_policy.h b/STL_Extension/include/CGAL/Handle_with_policy.h index 978fa9ec1c3..5f952a66e15 100644 --- a/STL_Extension/include/CGAL/Handle_with_policy.h +++ b/STL_Extension/include/CGAL/Handle_with_policy.h @@ -355,8 +355,8 @@ namespace Intern { typedef ::CGAL::Reference_counted_hierarchy_with_union Reference_counted_hierarchy_with_union; CGAL_USE_TYPE(Reference_counted_hierarchy_with_union); - static_assert(( - ::CGAL::is_same_or_derived< Reference_counted_hierarchy_with_union, T >::value )); + static_assert( + ::CGAL::is_same_or_derived< Reference_counted_hierarchy_with_union, T >::value ); } typedef T Rep; }; @@ -855,8 +855,8 @@ protected: //! argument, and the single argument template constructor no other //! constructor will work for class hierarchies of representations. Handle_with_policy( Rep* p) : ptr_( p) { - static_assert(( - ::CGAL::is_same_or_derived< Reference_counted_hierarchy_base, Handled_type >::value )); + static_assert( + ::CGAL::is_same_or_derived< Reference_counted_hierarchy_base, Handled_type >::value ); //Bind bind_; // trigger compile-time check //(void)bind_; (void)Bind(); @@ -869,8 +869,8 @@ protected: //! version of \c initialize_with is applicable in this case except //! the template version with one argument. void initialize_with( Rep* p) { - static_assert(( - ::CGAL::is_same_or_derived< Reference_counted_hierarchy_base, Handled_type >::value )); + static_assert( + ::CGAL::is_same_or_derived< Reference_counted_hierarchy_base, Handled_type >::value ); //Bind bind_; // trigger compile-time check //(void)bind_; (void)Bind(); diff --git a/STL_Extension/include/CGAL/Named_function_parameters.h b/STL_Extension/include/CGAL/Named_function_parameters.h index b116f6d5149..d0f1648f816 100644 --- a/STL_Extension/include/CGAL/Named_function_parameters.h +++ b/STL_Extension/include/CGAL/Named_function_parameters.h @@ -182,7 +182,7 @@ typename Get_param, Query_tag>::type get_parameter_impl(const Named_params_impl& np, Query_tag tag) { #ifndef CGAL_NO_STATIC_ASSERTION_TEST - static_assert( (!std::is_same::value) ); + static_assert(!std::is_same::value); #endif return get_parameter_impl(static_cast(np), tag); } @@ -243,7 +243,7 @@ template typename Get_param, Query_tag>::reference get_parameter_reference_impl(const Named_params_impl& np, Query_tag tag) { - static_assert( (!std::is_same::value) ); + static_assert(!std::is_same::value); return get_parameter_reference_impl(static_cast(np), tag); } diff --git a/STL_Extension/include/CGAL/transforming_pair_iterator.h b/STL_Extension/include/CGAL/transforming_pair_iterator.h index abc52a584e3..020a0b6d7c7 100644 --- a/STL_Extension/include/CGAL/transforming_pair_iterator.h +++ b/STL_Extension/include/CGAL/transforming_pair_iterator.h @@ -25,7 +25,7 @@ namespace CGAL { namespace internal { template ::value> struct Min_category { - static_assert((boost::is_convertible::value)); + static_assert(std::is_convertible::value); typedef Cat1 type; }; diff --git a/STL_Extension/test/STL_Extension/test_Cache.cpp b/STL_Extension/test/STL_Extension/test_Cache.cpp index 609eb6ab829..fc645fe5be0 100644 --- a/STL_Extension/test/STL_Extension/test_Cache.cpp +++ b/STL_Extension/test/STL_Extension/test_Cache.cpp @@ -57,16 +57,16 @@ struct Int_t : public CGAL::Handle_with_policy< Int_rep, Unify > { void test_typedefs(){ typedef CGAL::Cache Cache; CGAL_USE_TYPE(Cache); - static_assert(( ::std::is_same< Cache::Input, int >::value )); - static_assert(( ::std::is_same< Cache::Output,double>::value )); + static_assert(::std::is_same< Cache::Input, int >::value ); + static_assert(::std::is_same< Cache::Output,double>::value ); typedef CGAL::Creator_1 Creator_double; CGAL_USE_TYPE(Creator_double); - static_assert(( ::std::is_same::value )); + static_assert(::std::is_same::value ); typedef CGAL::Creator_1 Creator_int; CGAL_USE_TYPE(Creator_int); - static_assert(( ::std::is_same::value )); - static_assert(( ::std::is_same >::value )); - static_assert(( ::std::is_same >::value )); + static_assert(::std::is_same::value ); + static_assert(::std::is_same >::value ); + static_assert(::std::is_same >::value ); } int main(){ { diff --git a/STL_Extension/test/STL_Extension/test_cgal_named_params.cpp b/STL_Extension/test/STL_Extension/test_cgal_named_params.cpp index 1f474eebabb..c5fba6ce23b 100644 --- a/STL_Extension/test/STL_Extension/test_cgal_named_params.cpp +++ b/STL_Extension/test/STL_Extension/test_cgal_named_params.cpp @@ -46,7 +46,7 @@ template void test_no_copyable(const NamedParameters& np) { typedef typename inp::Get_param::type NP_type; - static_assert( (std::is_same >::value) ); + static_assert(std::is_same >::value); const A<4>& a = params::choose_parameter(params::get_parameter_reference(np, inp::edge_index), A<4>(4)); assert(a.v==4); @@ -60,31 +60,31 @@ void test_references(const NamedParameters& np) // std::reference_wrapper typedef typename inp::Lookup_named_param_def::reference Visitor_reference_type; - static_assert( (std::is_same::value) ); + static_assert(std::is_same::value); Visitor_reference_type vis_ref = params::choose_parameter(params::get_parameter_reference(np, inp::visitor), default_value); CGAL_USE(vis_ref); // std::reference_wrapper of const typedef typename inp::Lookup_named_param_def::reference FIM_reference_type; - static_assert( (std::is_same::value) ); + static_assert(std::is_same::value); FIM_reference_type fim_ref = params::choose_parameter(params::get_parameter_reference(np, inp::face_index), default_value); CGAL_USE(fim_ref); // non-copyable typedef typename inp::Lookup_named_param_def::reference VPM_reference_type; - static_assert( (std::is_same::value) ); + static_assert(std::is_same::value); VPM_reference_type vpm_ref = params::choose_parameter(params::get_parameter_reference(np, inp::vertex_point), default_value); CGAL_USE(vpm_ref); // passed by copy typedef typename inp::Lookup_named_param_def::reference VIM_reference_type; - static_assert( (std::is_same, VIM_reference_type>::value) ); + static_assert(std::is_same, VIM_reference_type>::value); VIM_reference_type vim_ref = params::choose_parameter(params::get_parameter_reference(np, inp::vertex_index), default_value); CGAL_USE(vim_ref); // default typedef typename inp::Lookup_named_param_def::reference EIM_reference_type; - static_assert(( std::is_same::value) ); + static_assert(std::is_same::value); EIM_reference_type eim_ref = params::choose_parameter(params::get_parameter_reference(np, inp::edge_index), default_value); assert(&eim_ref==&default_value); } @@ -103,12 +103,12 @@ int main() ); auto d = CGAL::parameters::default_values(); - static_assert( (std::is_same::value) ); + static_assert(std::is_same::value); #ifndef CGAL_NO_DEPRECATED_CODE auto d1 = CGAL::parameters::all_default(); - static_assert( (std::is_same::value) ); + static_assert(std::is_same::value); auto d2 = CGAL::Polygon_mesh_processing::parameters::all_default(); - static_assert( (std::is_same::value) ); + static_assert(std::is_same::value); #endif return EXIT_SUCCESS; diff --git a/STL_Extension/test/STL_Extension/test_is_iterator.cpp b/STL_Extension/test/STL_Extension/test_is_iterator.cpp index d1c3b157aaa..f308d9b4880 100644 --- a/STL_Extension/test/STL_Extension/test_is_iterator.cpp +++ b/STL_Extension/test/STL_Extension/test_is_iterator.cpp @@ -23,11 +23,11 @@ int main() { static_assert(!is_iterator::value); static_assert(is_iterator::value); - static_assert((is_iterator_type::value)); - static_assert((!is_iterator_type::value)); - static_assert((!is_iterator_type::value)); + static_assert(is_iterator_type::value); + static_assert(!is_iterator_type::value); + static_assert(!is_iterator_type::value); - static_assert((is_iterator_to::value)); - static_assert((!is_iterator_to::value)); - static_assert((!is_iterator_to::value)); + static_assert(is_iterator_to::value); + static_assert(!is_iterator_to::value); + static_assert(!is_iterator_to::value); } diff --git a/STL_Extension/test/STL_Extension/test_is_streamable.cpp b/STL_Extension/test/STL_Extension/test_is_streamable.cpp index 6e574cfdec1..fc248fc7e6e 100644 --- a/STL_Extension/test/STL_Extension/test_is_streamable.cpp +++ b/STL_Extension/test/STL_Extension/test_is_streamable.cpp @@ -27,6 +27,6 @@ int main() { static_assert(!is_streamable::value); static_assert(is_streamable::value); static_assert(is_streamable::value); - static_assert(! (is_streamable >::value) ); - static_assert( (is_streamable >::value) ); + static_assert(!is_streamable >::value); + static_assert(is_streamable >::value); } diff --git a/STL_Extension/test/STL_Extension/test_stl_extension.cpp b/STL_Extension/test/STL_Extension/test_stl_extension.cpp index 1895935f787..29e078c46c7 100644 --- a/STL_Extension/test/STL_Extension/test_stl_extension.cpp +++ b/STL_Extension/test/STL_Extension/test_stl_extension.cpp @@ -8120,7 +8120,7 @@ void test_tuple(){ static_assert( std::tuple_size::value == 0 ); static_assert( std::tuple_size::value == 2 ); static_assert( std::tuple_size::value == 4 ); - static_assert( (std::is_same::type,My_to_int>::value) ); + static_assert( std::is_same::type,My_to_int>::value ); T1 t1=std::make_tuple(1,2); T1 t1_2=std::make_tuple(1,2); @@ -8206,17 +8206,17 @@ void test_make_sorted_pair() { assert(p3==p4); int i=2; assert( CGAL::make_sorted_pair(1,i) == std::make_pair(1,i) ); - static_assert( (std::is_same< + static_assert( std::is_same< BOOST_TYPEOF(CGAL::make_sorted_pair(1L,i)), - std::pair >::value) ); + std::pair >::value); assert( (CGAL::make_sorted_pair(i,1L) == std::pair(1L,2L)) ); - static_assert( (std::is_same< + static_assert( std::is_same< BOOST_TYPEOF(CGAL::make_sorted_pair(1,2L)), - std::pair >::value) ); - static_assert( (std::is_same< + std::pair >::value) ; + static_assert( std::is_same< BOOST_TYPEOF(CGAL::make_sorted_pair(1,2L)), - std::pair >::value) ); + std::pair >::value); } void test_result_of() { @@ -8237,8 +8237,8 @@ void test_result_of() { typedef CGAL::cpp11::result_of::type result_type_float; CGAL_USE_TYPE(result_type); CGAL_USE_TYPE(result_type_float); - static_assert((std::is_same::value)); - static_assert((std::is_same::value)); + static_assert(std::is_same::value); + static_assert(std::is_same::value); } diff --git a/Shape_regularization/include/CGAL/Shape_regularization/regularize_planes.h b/Shape_regularization/include/CGAL/Shape_regularization/regularize_planes.h index a5a5c5e58cb..b86325e6d39 100644 --- a/Shape_regularization/include/CGAL/Shape_regularization/regularize_planes.h +++ b/Shape_regularization/include/CGAL/Shape_regularization/regularize_planes.h @@ -296,7 +296,7 @@ namespace Planes { using PlaneIndexMap = typename CGAL::Point_set_processing_3::GetPlaneIndexMap::type; - static_assert((!is_default_parameter::value), + static_assert(!is_default_parameter::value, "Error: no plane index map"); const PlaneIndexMap index_map = diff --git a/Snap_rounding_2/include/CGAL/Snap_rounding_kd_2.h b/Snap_rounding_2/include/CGAL/Snap_rounding_kd_2.h index ff11623a892..f7894c74eb5 100644 --- a/Snap_rounding_2/include/CGAL/Snap_rounding_kd_2.h +++ b/Snap_rounding_2/include/CGAL/Snap_rounding_kd_2.h @@ -107,7 +107,7 @@ public: template class Multiple_kd_tree { - static_assert((boost::is_pointer::value), "SAVED_OBJECT is not a pointer."); + static_assert(boost::is_pointer::value, "SAVED_OBJECT is not a pointer."); private: typedef Traits_ Traits; typedef typename Traits::FT NT; diff --git a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Bounded_distance_placement.h b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Bounded_distance_placement.h index 36f2f855312..04303b90353 100644 --- a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Bounded_distance_placement.h +++ b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Bounded_distance_placement.h @@ -49,7 +49,7 @@ private: template void initialize_tree(const Profile& profile) const { - static_assert((std::is_same::value)); + static_assert(std::is_same::value); typedef typename Profile::Triangle_mesh Triangle_mesh; typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; diff --git a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/FastEnvelope_filter.h b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/FastEnvelope_filter.h index 2f0abb38789..86fd7c87544 100644 --- a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/FastEnvelope_filter.h +++ b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/FastEnvelope_filter.h @@ -43,7 +43,7 @@ private: template void initialize_envelope(const Profile& profile) const { - static_assert((std::is_same::value)); + static_assert(std::is_same::value); typedef typename Profile::Triangle_mesh Triangle_mesh; typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; diff --git a/Surface_mesher/include/CGAL/Surface_mesher/Combining_oracle.h b/Surface_mesher/include/CGAL/Surface_mesher/Combining_oracle.h index 1340c1700e3..2541ef6ff30 100644 --- a/Surface_mesher/include/CGAL/Surface_mesher/Combining_oracle.h +++ b/Surface_mesher/include/CGAL/Surface_mesher/Combining_oracle.h @@ -51,9 +51,9 @@ namespace CGAL { typedef typename Oracle_a::Intersection_point Intersection_point; - static_assert((::std::is_same< + static_assert(::std::is_same< Intersection_point, - typename Oracle_b::Intersection_point>::value)); + typename Oracle_b::Intersection_point>::value); typedef ::CGAL::Multi_surface_3::value)); + static_assert(Arr_sane_identified_tagging< Left_side_category, Bottom_side_category, + Top_side_category, Right_side_category >::value); protected: /*! diff --git a/Triangulation_on_sphere_2/include/CGAL/Delaunay_triangulation_on_sphere_2.h b/Triangulation_on_sphere_2/include/CGAL/Delaunay_triangulation_on_sphere_2.h index f85c473285e..c6751c2a3cb 100644 --- a/Triangulation_on_sphere_2/include/CGAL/Delaunay_triangulation_on_sphere_2.h +++ b/Triangulation_on_sphere_2/include/CGAL/Delaunay_triangulation_on_sphere_2.h @@ -631,8 +631,8 @@ insert(InputIterator first, InputIterator beyond, { typedef Point_3_with_iterator P3_wit; - static_assert((std::is_same::value_type, Point>::value)); - static_assert(!(std::is_same::value)); + static_assert(std::is_same::value_type, Point>::value); + static_assert(!std::is_same::value); const size_type n = number_of_vertices(); From 11586736c746cf2a7eb2ea9697d0a7af46ca7cb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 20 Jun 2023 10:48:41 +0200 Subject: [PATCH 21/22] add missing include --- Alpha_shapes_2/include/CGAL/Alpha_shape_vertex_base_2.h | 1 + 1 file changed, 1 insertion(+) diff --git a/Alpha_shapes_2/include/CGAL/Alpha_shape_vertex_base_2.h b/Alpha_shapes_2/include/CGAL/Alpha_shape_vertex_base_2.h index e96dfaa5fcb..919fec145ec 100644 --- a/Alpha_shapes_2/include/CGAL/Alpha_shape_vertex_base_2.h +++ b/Alpha_shapes_2/include/CGAL/Alpha_shape_vertex_base_2.h @@ -19,6 +19,7 @@ #include #include #include +#include //------------------------------------------------------------------- namespace CGAL { From 6abf126e102afb46d5b1e8f71447075ccf86ec41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 20 Jun 2023 10:48:49 +0200 Subject: [PATCH 22/22] fix typo --- .../CGAL/Heat_method_3/Surface_mesh_geodesic_distances_3.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Heat_method_3/include/CGAL/Heat_method_3/Surface_mesh_geodesic_distances_3.h b/Heat_method_3/include/CGAL/Heat_method_3/Surface_mesh_geodesic_distances_3.h index 0d688be64ed..330e5005d53 100644 --- a/Heat_method_3/include/CGAL/Heat_method_3/Surface_mesh_geodesic_distances_3.h +++ b/Heat_method_3/include/CGAL/Heat_method_3/Surface_mesh_geodesic_distances_3.h @@ -752,8 +752,8 @@ class Surface_mesh_geodesic_distances_3 > #endif { - static_assert(std::is_same::value) || - (std::is_same::value); + static_assert(std::is_same::value || + std::is_same::value); // extract real types from Default #ifdef CGAL_EIGEN3_ENABLED