From a30dba00e340edfe5ed1f69896c678abe369afea Mon Sep 17 00:00:00 2001 From: David Wells Date: Mon, 7 May 2018 21:40:45 -0400 Subject: [PATCH] Add a comment on a compiler error. This is only a problem with GCC when -fconcepts is used with -std=c++11: this combination does not make sense since C++11 does not support concepts, but nonetheless the explicit types avoid an internal compiler error in this case. --- source/gmsh/utilities.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source/gmsh/utilities.cc b/source/gmsh/utilities.cc index d4be45f358..0ee8d7bf67 100644 --- a/source/gmsh/utilities.cc +++ b/source/gmsh/utilities.cc @@ -100,6 +100,12 @@ namespace Gmsh if (base_name != prm.output_base_name) { + // declaring the list without a type, i.e., + // + // auto filenames = {{iges_file_name, geo_file_name, ...}}) + // + // causes internal compiler errors with GCC's concepts implementation, + // so give it an explicit type: 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) -- 2.39.5