]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix a 'bind to temporary' warning.
authorDavid Wells <drwells@email.unc.edu>
Thu, 22 Jun 2023 13:44:50 +0000 (09:44 -0400)
committerDavid Wells <drwells@email.unc.edu>
Thu, 22 Jun 2023 14:09:49 +0000 (10:09 -0400)
examples/step-62/step-62.cc

index d85192fe0e51dcfa8d96ff976735ddd5d6234a39..551ac1b4e39b310c766a450f40226f5501ae2601 100644 (file)
@@ -1386,7 +1386,9 @@ int main(int argc, char *argv[])
 
       // Each of the simulations (displacement and calibration) is stored in a
       // separate HDF5 group:
-      for (const std::string &group_name : {"displacement", "calibration"})
+      const std::array<std::string, 2> group_names{
+        {"displacement", "calibration"}};
+      for (const std::string &group_name : group_names)
         {
           // For each of these two group names, we now create the group and put
           // attributes into these groups.

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.