]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add a comment on a compiler error. 6520/head
authorDavid Wells <wellsd2@rpi.edu>
Tue, 8 May 2018 01:40:45 +0000 (21:40 -0400)
committerDavid Wells <wellsd2@rpi.edu>
Tue, 8 May 2018 01:40:45 +0000 (21:40 -0400)
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

index d4be45f358631b9a9f3143a20779ad8b0a4cb945..0ee8d7bf67e43097f70fac707bf4425324bb92db 100644 (file)
@@ -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<const std::string *, 5> filenames
         {{&iges_file_name, &geo_file_name, &msh_file_name, &log_file_name, &warnings_file_name}};
         for (const std::string *filename : filenames)

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.