From 7358ffd959aea5d2ad4398adc55501fb2a09bcec Mon Sep 17 00:00:00 2001 From: David Wells Date: Thu, 22 Jun 2023 09:44:50 -0400 Subject: [PATCH] Fix a 'bind to temporary' warning. --- examples/step-62/step-62.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/step-62/step-62.cc b/examples/step-62/step-62.cc index d85192fe0e..551ac1b4e3 100644 --- a/examples/step-62/step-62.cc +++ b/examples/step-62/step-62.cc @@ -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 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. -- 2.39.5