]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Work around a compiler bug in a variadic template. 4946/head
authorDavid Wells <wellsd2@rpi.edu>
Wed, 23 Aug 2017 22:39:07 +0000 (18:39 -0400)
committerDavid Wells <wellsd2@rpi.edu>
Wed, 23 Aug 2017 22:39:07 +0000 (18:39 -0400)
GCC 7.1.1 encounters an internal error when parsing the current version of this;
we can get around the problem by naming the initializer list of pointers.

include/deal.II/hp/fe_collection.h

index d913b137fc78a2db7c344ffb42a8e1073cbdf8b8..044d6cd71f0c155811600f25c3ce4f4c9c0036ae 100644 (file)
@@ -458,12 +458,11 @@ namespace hp
                   "Not all of the input arguments of this function "
                   "are derived from FiniteElement<dim,spacedim>!");
 
-    // loop over all of the given arguments and add the finite
-    // elements to this collection
-    for (auto p :
-         {
-           &fes...
-         })
+    // loop over all of the given arguments and add the finite elements to
+    // this collection. Inlining the definition of fe_pointers causes internal
+    // compiler errors on GCC 7.1.1 so we define it separately:
+    const auto fe_pointers = { &fes... };
+    for (auto p : fe_pointers)
       push_back (*p);
   }
 

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.