From: Matthias Maier Date: Fri, 12 Jun 2020 06:17:57 +0000 (-0500) Subject: Bugfix: Return a reference to *this in operator= X-Git-Tag: v9.3.0-rc1~1439^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F10521%2Fhead;p=dealii.git Bugfix: Return a reference to *this in operator= Wow. I missed this. Surprising that we did not get a compiler warning for this. This fixes tests bits/periodicity_06/07 [1, 2]. [1] That test something entirely different but luckily happen to trigger this. [2] https://cdash.43-1.org/testDetails.php?test=47189344&build=7349 terminate called after throwing an instance of 'std::system_error' what(): Operation not permitted In reference to #10473 --- diff --git a/include/deal.II/base/thread_local_storage.h b/include/deal.II/base/thread_local_storage.h index 80e47afb63..cd40096a46 100644 --- a/include/deal.II/base/thread_local_storage.h +++ b/include/deal.II/base/thread_local_storage.h @@ -353,6 +353,8 @@ namespace Threads std::unique_lock writer_lock(insertion_mutex); data = std::move(t.data); + + return *this; }