From: David Wells Date: Mon, 7 May 2018 23:14:22 +0000 (-0400) Subject: Work around an internal compiler error on GCC7. X-Git-Tag: v9.0.0-rc4~6^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F6515%2Fhead;p=dealii.git Work around an internal compiler error on GCC7. --- diff --git a/source/gmsh/utilities.cc b/source/gmsh/utilities.cc index 8e011edc13..d4be45f358 100644 --- a/source/gmsh/utilities.cc +++ b/source/gmsh/utilities.cc @@ -100,11 +100,13 @@ namespace Gmsh if (base_name != prm.output_base_name) { - for (const auto &filename: {iges_file_name,geo_file_name,msh_file_name,log_file_name,warnings_file_name}) - { - const auto ret_value = std::remove(filename.c_str()); - AssertThrow(ret_value == 0, ExcMessage("Failed to remove "+filename)); - } + const std::array filenames + {{&iges_file_name, &geo_file_name, &msh_file_name, &log_file_name, &warnings_file_name}}; + for (const std::string *filename : filenames) + { + const auto ret_value = std::remove(filename->c_str()); + AssertThrow(ret_value == 0, ExcMessage("Failed to remove " + *filename)); + } const auto ret_value = std::remove(dir_template); AssertThrow(ret_value == 0, ExcMessage("Failed to remove "+std::string(dir_template)));