]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Add some more commentary.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 7 Sep 2011 23:58:11 +0000 (23:58 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 7 Sep 2011 23:58:11 +0000 (23:58 +0000)
git-svn-id: https://svn.dealii.org/trunk@24282 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/base/thread_local_storage.h

index 9f7caab121edd85e41fc37876a7b40f993df32c5..e59d0dad2bee0c40bd5e9c7e954361567bb5dfb5 100644 (file)
@@ -85,6 +85,16 @@ namespace Threads
     /**
      * Return a reference to the data stored by this object for the current
      * thread this function is called on.
+     * 
+     * Note that there is no member function get() that is const and
+     * returns a const reference as one would expect. The reason is that
+     * if such a member function were called on a thread for which no
+     * thread-local object has been created yet, then one has to create
+     * such an object first which would certainly be a non-constant
+     * operation. If you need to call the get() function for a member
+     * variable of a class from a const member function, then you
+     * need to declare the member variable <code>mutable</code> to
+     * allow such access.
      */
     T & get ();
     

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.