diff --git a/Alpha_wrap_3/benchmark/Alpha_wrap_3/Quality/quality_benchmark.cpp b/Alpha_wrap_3/benchmark/Alpha_wrap_3/Quality/quality_benchmark.cpp index f8e54c488a4..12fa0690c9d 100644 --- a/Alpha_wrap_3/benchmark/Alpha_wrap_3/Quality/quality_benchmark.cpp +++ b/Alpha_wrap_3/benchmark/Alpha_wrap_3/Quality/quality_benchmark.cpp @@ -75,7 +75,7 @@ double mean_min_angle(const Mesh& mesh) const Triangle_3 tr = surface_mesh_face_to_triangle(f, mesh); std::array angles = triangle_angles(tr); - FT min_angle = std::min({angles[0], angles[1], angles[2]}); + FT min_angle = (std::min)({angles[0], angles[1], angles[2]}); min_angle = min_angle * (180.0 / CGAL_PI); mean_min_angle += min_angle; @@ -93,7 +93,7 @@ double mean_max_angle(const Mesh& mesh) const Triangle_3 tr = surface_mesh_face_to_triangle(f, mesh); std::array angles = triangle_angles(tr); - FT max_angle = std::max({angles[0], angles[1], angles[2]}); + FT max_angle = (std::max)({angles[0], angles[1], angles[2]}); max_angle = max_angle * (180.0 / CGAL_PI); mean_max_angle += max_angle; @@ -151,8 +151,8 @@ double mean_edge_ratio(const Mesh& mesh, FT a = std::sqrt(CGAL::squared_distance(tr[0], tr[1])); FT b = std::sqrt(CGAL::squared_distance(tr[1], tr[2])); FT c = std::sqrt(CGAL::squared_distance(tr[2], tr[0])); - FT min_edge = std::min({a, b, c}); - FT max_edge = std::max({a, b, c}); + FT min_edge = (std::min)({a, b, c}); + FT max_edge = (std::max)({a, b, c}); FT edge_ratio = max_edge / min_edge; mean_edge_ratio += edge_ratio; @@ -181,7 +181,7 @@ double mean_aspect_ratio(const Mesh& mesh, FT c = std::sqrt(CGAL::squared_distance(tr[2], tr[0])); FT s = 0.5 * (a + b + c); FT inscribed_radius = std::sqrt((s * (s - a) * (s - b) * (s - c)) / s); - FT max_edge = std::max({a, b, c}); + FT max_edge = (std::max)({a, b, c}); FT aspect_ratio = max_edge / inscribed_radius; aspect_ratio /= (2. * std::sqrt(3.)); // normalized mean_aspect_ratio += aspect_ratio; diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/GUI_country_pick_handler.cpp b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/GUI_country_pick_handler.cpp index 58bc34f3ca2..53f7aba4972 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/GUI_country_pick_handler.cpp +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/GUI_country_pick_handler.cpp @@ -62,7 +62,7 @@ void GUI_country_pick_handler::mouse_press_event(QMouseEvent* e) { auto sd = sqrt(d); auto t1 = (-b - sd) / (2 * a); auto t2 = (-b + sd) / (2 * a); - if (t1 > 0 && t2 > 0) ti = std::min(t1, t2); + if (t1 > 0 && t2 > 0) ti = (std::min)(t1, t2); else if (t1 > 0) ti = t1; else ti = t2; } diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Main_widget.cpp b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Main_widget.cpp index f99c6c7e55b..decff54e3d5 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Main_widget.cpp +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Main_widget.cpp @@ -140,7 +140,7 @@ void Main_widget::initializeGL() { for (auto& [country_name, triangle_points] : country_triangles_map) { auto country_triangles = std::make_unique(triangle_points); auto color = QVector4D(rndm(), rndm(), rndm(), 1); - auto m = std::max(color.x(), std::max(color.y(), color.z())); + auto m = (std::max)(color.x(), (std::max)(color.y(), color.z())); color /= m; color *= m_dimming_factor; color.setW(1); diff --git a/CGAL_Core/include/CGAL/CORE/poly/Curves.tcc b/CGAL_Core/include/CGAL/CORE/poly/Curves.tcc index 3f53e34da44..b287edaecc7 100644 --- a/CGAL_Core/include/CGAL/CORE/poly/Curves.tcc +++ b/CGAL_Core/include/CGAL/CORE/poly/Curves.tcc @@ -544,7 +544,7 @@ template int BiPoly::getXdegree(){ int deg=-1; for(int i=0; i <=ydeg; i++) - deg = max(deg, coeffX[i].getTrueDegree()); + deg = (max)(deg, coeffX[i].getTrueDegree()); return deg; } diff --git a/Circular_kernel_2/include/CGAL/Circular_kernel_2/internal_functions_on_circular_arc_2.h b/Circular_kernel_2/include/CGAL/Circular_kernel_2/internal_functions_on_circular_arc_2.h index b5830954ec7..0bfc65d0a55 100644 --- a/Circular_kernel_2/include/CGAL/Circular_kernel_2/internal_functions_on_circular_arc_2.h +++ b/Circular_kernel_2/include/CGAL/Circular_kernel_2/internal_functions_on_circular_arc_2.h @@ -1565,7 +1565,7 @@ advanced_make_xy_monotone( const typename CK::Circular_arc_2 &a, double ymax = (is_on_upper) ? to_interval ( CircularFunctors::y_extremal_point(a.supporting_circle(),false).y() ).second : - CGAL::max(left_bb.ymax(),right_bb.ymax()); + (CGAL::max)(left_bb.ymax(),right_bb.ymax()); */ return Bbox_2(left_bb.xmin(),ymin,right_bb.xmax(),ymax); } diff --git a/Distance_3/include/CGAL/Distance_3/Triangle_3_Triangle_3.h b/Distance_3/include/CGAL/Distance_3/Triangle_3_Triangle_3.h index 73f4b0eb69c..f6bf77fd39b 100644 --- a/Distance_3/include/CGAL/Distance_3/Triangle_3_Triangle_3.h +++ b/Distance_3/include/CGAL/Distance_3/Triangle_3_Triangle_3.h @@ -207,7 +207,7 @@ squared_distance(const typename K::Triangle_3& tr1, FT sqd_q2 = CGAL::squared_distance(vertex(tr2, 1), tr1); FT sqd_r2 = CGAL::squared_distance(vertex(tr2, 2), tr1); - const FT m = std::min({sqd_p1, sqd_q1, sqd_r1, sqd_p2, sqd_q2, sqd_r2}); + const FT m = (std::min)({sqd_p1, sqd_q1, sqd_r1, sqd_p2, sqd_q2, sqd_r2}); return m; #endif diff --git a/Lab/demo/Lab/MainWindow.cpp b/Lab/demo/Lab/MainWindow.cpp index dd133dbf44f..60b75d24fe4 100644 --- a/Lab/demo/Lab/MainWindow.cpp +++ b/Lab/demo/Lab/MainWindow.cpp @@ -2396,8 +2396,12 @@ void MainWindow::viewerShowObject() } if(item) { const Scene::Bbox bbox = item->bbox(); - CGAL::qglviewer::Vec min(static_cast(bbox.xmin())+viewer->offset().x, static_cast(bbox.ymin())+viewer->offset().y, static_cast(bbox.zmin())+viewer->offset().z), - max(static_cast(bbox.xmax())+viewer->offset().x, static_cast(bbox.ymax())+viewer->offset().y, static_cast(bbox.zmax())+viewer->offset().z); + CGAL::qglviewer::Vec min{static_cast(bbox.xmin()) + viewer->offset().x, + static_cast(bbox.ymin()) + viewer->offset().y, + static_cast(bbox.zmin()) + viewer->offset().z}; + CGAL::qglviewer::Vec max{static_cast(bbox.xmax()) + viewer->offset().x, + static_cast(bbox.ymax()) + viewer->offset().y, + static_cast(bbox.zmax()) + viewer->offset().z}; viewer->setSceneBoundingBox(min, max); viewerShow(static_cast(min.x), static_cast(min.y), static_cast(min.z), static_cast(max.x), static_cast(max.y), static_cast(max.z)); diff --git a/Lab/demo/Lab/Plugins/PMP/Interpolated_corrected_principal_curvatures_plugin.cpp b/Lab/demo/Lab/Plugins/PMP/Interpolated_corrected_principal_curvatures_plugin.cpp index dbe630ad09f..489b5baca5f 100644 --- a/Lab/demo/Lab/Plugins/PMP/Interpolated_corrected_principal_curvatures_plugin.cpp +++ b/Lab/demo/Lab/Plugins/PMP/Interpolated_corrected_principal_curvatures_plugin.cpp @@ -84,7 +84,8 @@ void compute(SMesh* sMesh, for (Vertex_descriptor v : vertices(*sMesh)) { const PMP::Principal_curvatures_and_directions pc = principal_curvatures_and_directions_map[v]; - max_curvature_magnitude_on_mesh = std::max(max_curvature_magnitude_on_mesh, std::max(abs(pc.min_curvature), abs(pc.max_curvature))); + max_curvature_magnitude_on_mesh = + (std::max)(max_curvature_magnitude_on_mesh, (std::max)(abs(pc.min_curvature), abs(pc.max_curvature))); } for(Vertex_descriptor v : vertices(*sMesh)) diff --git a/Matrix_search/test/Matrix_search/sorted_matrix_search_test.cpp b/Matrix_search/test/Matrix_search/sorted_matrix_search_test.cpp index 22b2e16b82d..e5088183176 100644 --- a/Matrix_search/test/Matrix_search/sorted_matrix_search_test.cpp +++ b/Matrix_search/test/Matrix_search/sorted_matrix_search_test.cpp @@ -148,7 +148,7 @@ main( int argc, char* argv[]) */ // evt. update max_entry: - max_entry = max( a[dim - 1] + b[dim - 1], max_entry); + max_entry = (max)( a[dim - 1] + b[dim - 1], max_entry); // keep both vectors: vectors.push_back( a); diff --git a/Number_types/include/CGAL/leda_bigfloat_interval.h b/Number_types/include/CGAL/leda_bigfloat_interval.h index 25b0e2d8c66..8e347812b9d 100644 --- a/Number_types/include/CGAL/leda_bigfloat_interval.h +++ b/Number_types/include/CGAL/leda_bigfloat_interval.h @@ -202,8 +202,8 @@ public: std::pair lower_I(CGAL::to_interval(x.lower())); std::pair upper_I(CGAL::to_interval(x.upper())); return std::pair< double, double >( - CGAL::min(lower_I.first , upper_I.first ), - CGAL::max(lower_I.second, upper_I.second)); + (CGAL::min)(lower_I.first , upper_I.first ), + (CGAL::max)(lower_I.second, upper_I.second)); } }; }; diff --git a/STL_Extension/include/CGAL/Random_allocator.h b/STL_Extension/include/CGAL/Random_allocator.h index 51d36a901fd..69bde52db9b 100644 --- a/STL_Extension/include/CGAL/Random_allocator.h +++ b/STL_Extension/include/CGAL/Random_allocator.h @@ -149,7 +149,7 @@ Random_allocator::allocate(size_type n, const void* hint) #endif // CGAL_DEBUG_RANDOM_ALLOCATOR return block->data + index; } - size_type block_size = std::max(n * random_size, minimal_block_size); + size_type block_size = (std::max)(n * random_size, minimal_block_size); ptr_->allocate_new_block(block_size); return allocate(n, hint); } @@ -183,7 +183,7 @@ template typename Random_allocator::size_type Random_allocator::max_size() const noexcept { - return std::numeric_limits::max() / sizeof(T); + return (std::numeric_limits::max)() / sizeof(T); } } // namespace CGAL diff --git a/Spatial_searching/benchmark/Spatial_searching/include/nanoflann.hpp b/Spatial_searching/benchmark/Spatial_searching/include/nanoflann.hpp index 3dd0b399892..a9972641131 100644 --- a/Spatial_searching/benchmark/Spatial_searching/include/nanoflann.hpp +++ b/Spatial_searching/benchmark/Spatial_searching/include/nanoflann.hpp @@ -1002,7 +1002,7 @@ namespace nanoflann if(node->child1 == NULL && node->child2 == NULL) return 1; else{ - return std::max(depth(node->child1)+1,depth(node->child2)+1); + return (std::max)(depth(node->child1)+1,depth(node->child2)+1); } } @@ -1130,8 +1130,8 @@ namespace nanoflann node->sub.divhigh = right_bbox[cutfeat].low; for (int i=0; i<(DIM>0 ? DIM : dim); ++i) { - bbox[i].low = std::min(left_bbox[i].low, right_bbox[i].low); - bbox[i].high = std::max(left_bbox[i].high, right_bbox[i].high); + bbox[i].low = (std::min)(left_bbox[i].low, right_bbox[i].low); + bbox[i].high = (std::max)(left_bbox[i].high, right_bbox[i].high); } } diff --git a/Surface_mesh_topology/benchmark/Surface_mesh_topology/path_homotopy_with_schema.cpp b/Surface_mesh_topology/benchmark/Surface_mesh_topology/path_homotopy_with_schema.cpp index 9a5f36d352b..e6d3b3d7104 100644 --- a/Surface_mesh_topology/benchmark/Surface_mesh_topology/path_homotopy_with_schema.cpp +++ b/Surface_mesh_topology/benchmark/Surface_mesh_topology/path_homotopy_with_schema.cpp @@ -118,13 +118,13 @@ int main(int argc, char** argv) if (!withE) { E=static_cast(random.get_int - (10, std::max(std::size_t(11), - cm.number_of_darts()/10))); } + (10, (std::max)(std::size_t(11), + cm.number_of_darts()/10))); } if (!withD) { D=static_cast(random.get_int - (10, std::max(std::size_t(11), - cm.number_of_darts()/10))); } + (10, (std::max)(std::size_t(11), + cm.number_of_darts()/10))); } diff --git a/Triangulation_2/include/CGAL/Triangulation_2/internal/Polyline_constraint_hierarchy_2.h b/Triangulation_2/include/CGAL/Triangulation_2/internal/Polyline_constraint_hierarchy_2.h index 8a6f32ba81f..43925c10b52 100644 --- a/Triangulation_2/include/CGAL/Triangulation_2/internal/Polyline_constraint_hierarchy_2.h +++ b/Triangulation_2/include/CGAL/Triangulation_2/internal/Polyline_constraint_hierarchy_2.h @@ -116,7 +116,7 @@ public: struct Constraint_id { Vertex_list_ptr vl = nullptr; - size_type id = std::numeric_limits::max(); + size_type id = (std::numeric_limits::max)(); Constraint_id(std::nullptr_t = nullptr) {} Constraint_id(Vertex_list_ptr vl, size_type id) : vl(vl), id(id) {} @@ -131,7 +131,7 @@ public: Constraint_id& operator=(std::nullptr_t) { vl = nullptr; - id = std::numeric_limits::max(); + id = (std::numeric_limits::max)(); return *this; } bool operator==(std::nullptr_t n) const { return vl == n; }