Boost C++ Libraries: Ticket #10665: boost::uuids::name_generator::operator() is not const, as promised in the documentation https://svn.boost.org/trac10/ticket/10665 <p> The uuids::name_generator holds an internal state (detail::sha1 sha), which is resetted on every operator() call, hence the operator() cannot be const. </p> <p> So the generators aren't reentrant and cannot be shared between threads. :-( </p> <p> Solution: </p> <p> Make the state a local variable in the operator(). So the operator() can be const (as documentation promises) and the class becomes reentrant. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/10665 Trac 1.4.3 James E. King, III Sun, 13 Aug 2017 00:39:24 GMT owner changed https://svn.boost.org/trac10/ticket/10665#comment:1 https://svn.boost.org/trac10/ticket/10665#comment:1 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Andy Tompkins</span> to <span class="trac-author">James E. King, III</span> </li> </ul> Ticket James E. King, III Sun, 13 Aug 2017 00:45:38 GMT <link>https://svn.boost.org/trac10/ticket/10665#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10665#comment:2</guid> <description> <p> PR to resolve: <a class="ext-link" href="https://github.com/boostorg/uuid/pull/23"><span class="icon">​</span>https://github.com/boostorg/uuid/pull/23</a> </p> </description> <category>Ticket</category> </item> <item> <dc:creator>James E. King, III</dc:creator> <pubDate>Sun, 27 Aug 2017 18:21:18 GMT</pubDate> <title>status, milestone changed; resolution set https://svn.boost.org/trac10/ticket/10665#comment:3 https://svn.boost.org/trac10/ticket/10665#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> <li><strong>milestone</strong> <span class="trac-field-old">To Be Determined</span> → <span class="trac-field-new">Boost 1.66.0</span> </li> </ul> Ticket