From: bangerth Date: Wed, 7 Sep 2011 23:58:11 +0000 (+0000) Subject: Add some more commentary. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4af114093677afe38bc5a578d62afe09e422fea8;p=dealii-svn.git Add some more commentary. git-svn-id: https://svn.dealii.org/trunk@24282 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/include/deal.II/base/thread_local_storage.h b/deal.II/include/deal.II/base/thread_local_storage.h index 9f7caab121..e59d0dad2b 100644 --- a/deal.II/include/deal.II/base/thread_local_storage.h +++ b/deal.II/include/deal.II/base/thread_local_storage.h @@ -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 mutable to + * allow such access. */ T & get ();