]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix CUDA build: make insertion_mutex mutable 10571/head
authorBruno Turcksin <bruno.turcksin@gmail.com>
Mon, 22 Jun 2020 16:22:31 +0000 (16:22 +0000)
committerBruno Turcksin <bruno.turcksin@gmail.com>
Mon, 22 Jun 2020 16:22:31 +0000 (16:22 +0000)
The constructor of std::shared_lock cannot take a const ref

include/deal.II/base/thread_local_storage.h

index cd40096a4678332db304e848b86aaf1664daa9d4..1bd0716b605df07776701f0f73d7058bea0cbdae 100644 (file)
@@ -248,9 +248,9 @@ namespace Threads
      * (https://en.wikipedia.org/wiki/Readers%E2%80%93writer_lock).
      */
 #  ifdef DEAL_II_HAVE_CXX17
-    std::shared_mutex insertion_mutex;
+    mutable std::shared_mutex insertion_mutex;
 #  else
-    std::shared_timed_mutex insertion_mutex;
+    mutable std::shared_timed_mutex insertion_mutex;
 #  endif
 
     /**

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.