From: David Wells Date: Wed, 23 Aug 2017 22:39:07 +0000 (-0400) Subject: Work around a compiler bug in a variadic template. X-Git-Tag: v9.0.0-rc1~1181^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a68733ae7b2aae5b99f46fcbb7bbf868ec0930fc;p=dealii.git Work around a compiler bug in a variadic template. 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. --- diff --git a/include/deal.II/hp/fe_collection.h b/include/deal.II/hp/fe_collection.h index d913b137fc..044d6cd71f 100644 --- a/include/deal.II/hp/fe_collection.h +++ b/include/deal.II/hp/fe_collection.h @@ -458,12 +458,11 @@ namespace hp "Not all of the input arguments of this function " "are derived from FiniteElement!"); - // 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); }