]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Make sure two cell iterator arguments lead to correct type deduction. 16763/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Wed, 20 Mar 2024 13:02:57 +0000 (07:02 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Wed, 20 Mar 2024 13:02:57 +0000 (07:02 -0600)
include/deal.II/base/quadrature_point_data.h

index 3e7e283445a9c3d708b602d1c3012e0e0e5beaa5..edced53a0dbaea153e989a384429d722ff3f5385 100644 (file)
@@ -110,9 +110,10 @@ public:
    */
   template <typename T = DataType>
   void
-  initialize(const CellIteratorType &cell_start,
-             const CellIteratorType &cell_end,
-             const unsigned int      number_of_data_points_per_cell);
+  initialize(
+    const CellIteratorType                                          &cell_start,
+    const typename std_cxx20::type_identity<CellIteratorType>::type &cell_end,
+    const unsigned int number_of_data_points_per_cell);
 
   /**
    * Removes data stored at the @p cell. Returns true if the data was removed.
@@ -630,9 +631,9 @@ template <typename CellIteratorType, typename DataType>
 template <typename T>
 inline void
 CellDataStorage<CellIteratorType, DataType>::initialize(
-  const CellIteratorType &cell_start,
-  const CellIteratorType &cell_end,
-  const unsigned int      number)
+  const CellIteratorType                                          &cell_start,
+  const typename std_cxx20::type_identity<CellIteratorType>::type &cell_end,
+  const unsigned int                                               number)
 {
   for (CellIteratorType it = cell_start; it != cell_end; ++it)
     if (it->is_locally_owned())

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.