From: Wolfgang Bangerth Date: Sat, 29 Mar 2025 14:47:23 +0000 (-0600) Subject: Omit 'const' for variables declared 'constexpr const'. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0f5c6a655e7fe62a72285807d1bb4eac4c6dbb5f;p=dealii.git Omit 'const' for variables declared 'constexpr const'. --- diff --git a/include/deal.II/base/patterns.h b/include/deal.II/base/patterns.h index 84b5f9d4ef..cacab306da 100644 --- a/include/deal.II/base/patterns.h +++ b/include/deal.II/base/patterns.h @@ -1632,14 +1632,14 @@ namespace Patterns template struct is_list_compatible { - static constexpr const bool value = + static constexpr bool value = internal::is_list_compatible>::value; }; template struct is_map_compatible { - static constexpr const bool value = + static constexpr bool value = internal::is_map_compatible>::value; }; diff --git a/include/deal.II/grid/reference_cell.h b/include/deal.II/grid/reference_cell.h index bffec5089c..046c926870 100644 --- a/include/deal.II/grid/reference_cell.h +++ b/include/deal.II/grid/reference_cell.h @@ -1216,25 +1216,19 @@ namespace internal */ namespace ReferenceCells { - constexpr const ReferenceCell Vertex = - internal::make_reference_cell_from_int(0); - constexpr const ReferenceCell Line = - internal::make_reference_cell_from_int(1); - constexpr const ReferenceCell Triangle = - internal::make_reference_cell_from_int(2); - constexpr const ReferenceCell Quadrilateral = + constexpr ReferenceCell Vertex = internal::make_reference_cell_from_int(0); + constexpr ReferenceCell Line = internal::make_reference_cell_from_int(1); + constexpr ReferenceCell Triangle = internal::make_reference_cell_from_int(2); + constexpr ReferenceCell Quadrilateral = internal::make_reference_cell_from_int(3); - constexpr const ReferenceCell Tetrahedron = + constexpr ReferenceCell Tetrahedron = internal::make_reference_cell_from_int(4); - constexpr const ReferenceCell Pyramid = - internal::make_reference_cell_from_int(5); - constexpr const ReferenceCell Wedge = - internal::make_reference_cell_from_int(6); - constexpr const ReferenceCell Hexahedron = + constexpr ReferenceCell Pyramid = internal::make_reference_cell_from_int(5); + constexpr ReferenceCell Wedge = internal::make_reference_cell_from_int(6); + constexpr ReferenceCell Hexahedron = internal::make_reference_cell_from_int(7); - constexpr const ReferenceCell Invalid = - internal::make_reference_cell_from_int( - std::numeric_limits::max()); + constexpr ReferenceCell Invalid = internal::make_reference_cell_from_int( + std::numeric_limits::max()); /** * Return the correct simplex reference cell type for the given dimension diff --git a/include/deal.II/matrix_free/portable_matrix_free.h b/include/deal.II/matrix_free/portable_matrix_free.h index 85ef6c9f40..c574221888 100644 --- a/include/deal.II/matrix_free/portable_matrix_free.h +++ b/include/deal.II/matrix_free/portable_matrix_free.h @@ -73,7 +73,7 @@ namespace Portable * of blocks in a BlockVector and the number of FEEvaluation objects that can * be active in a single cell_loop(). */ - inline constexpr const unsigned int n_max_dof_handlers = 5; + inline constexpr unsigned int n_max_dof_handlers = 5; /** * Type for source and destination vectors in device functions like diff --git a/include/deal.II/meshworker/copy_data.h b/include/deal.II/meshworker/copy_data.h index 64ded382ed..4513cb6ea3 100644 --- a/include/deal.II/meshworker/copy_data.h +++ b/include/deal.II/meshworker/copy_data.h @@ -223,8 +223,7 @@ namespace MeshWorker { // We permit different numbers of matrices, vectors and DoF index vectors. // So we have to be a bit permissive here. - constexpr const int max_index = - std::max({n_matrices, n_vectors, n_dof_indices}); + constexpr int max_index = std::max({n_matrices, n_vectors, n_dof_indices}); (void)max_index; Assert(index < max_index, ExcIndexRange(index, 0, max_index));