From: Wolfgang Bangerth Date: Thu, 3 Aug 2017 14:01:17 +0000 (-0600) Subject: Adapt @asartori's patch to fix the correct problem. X-Git-Tag: v9.0.0-rc1~1352^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cc79c1259c3134721bfff51311fa4fefe4efc542;p=dealii.git Adapt @asartori's patch to fix the correct problem. --- diff --git a/include/deal.II/base/function_parser.h b/include/deal.II/base/function_parser.h index 5170af931a..6a4accae91 100644 --- a/include/deal.II/base/function_parser.h +++ b/include/deal.II/base/function_parser.h @@ -328,11 +328,17 @@ private: /** * The muParser objects for each thread (and one for each component). We are - * storing shared_ptr so that we don't need to include the definition of + * storing a unique_ptr so that we don't need to include the definition of * mu::Parser in this header. */ - // std::unique_ptr does not compile with gcc-5.4 +#if TBB_VERSION_MAJOR >= 4 + mutable Threads::ThreadLocalStorage > > fp; +#else + // older TBBs have a bug in which they want to return thread-local + // objects by value. this doesn't work for std::unique_ptr, so use a + // std::shared_ptr mutable Threads::ThreadLocalStorage > > fp; +#endif /** * An array to keep track of all the constants, required to initialize fp in