Boost C++ Libraries: Ticket #4083: thread_id value not exported. https://svn.boost.org/trac10/ticket/4083 <p> Moin Moin. </p> <p> Trying to write programmes, using unique ids per thread and only per thread, recommend themselves to be numbered by this_thread:get_id(). Unfortunately, the data-member (in "boost\boost\thread\detail\thread.hpp":line 50.) is both.: </p> <ol start="0"><li>declared private (not protected), </li><li>not exported by an access-function. </li></ol><p> Right now, in order to maintain maximum compatibility as well as the emission of the same old error-messages, I just added the missing access-functions.: const thread_data&amp;const_Wert(void)const{return thread_data;}; </p> <blockquote> <p> thread_data&amp; Wert(void) {return thread_data;}; </p> </blockquote> <p> Similarly I moved "typedef ... super_t;" in "boost\boost\iterator\filter_iterator.hpp":line 50 to the public-scope, as I needed it for my typedefs and did not see a point in deplaring any typedef as an unpublican(ian)<sup>n (for an appropriate n&gt;=0). </sup></p> <p> Hence my request to.: </p> <ol class="loweralpha"><li>generally use the keyword private only iff public/protected access-functions-to the underlying data exist. </li><li>To put typedefs in the public/protected area only, or at least to put typedefs in there, allowing acces to all types that might be needed (somewhen.). </li><li>To typedef all template-parameters like class Predicate, class Iterator in the aforementioned "filter_iterator.hpp", where, later on I did write a less restricted version of this class (But did not invest the same amount of work, just to add some access-functions.). </li></ol><blockquote> <p> Tschuess, </p> <blockquote> <p> Michael. </p> </blockquote> </blockquote> <p> P.S.: I did append the ammended version of "Filter_iterator" in order to illustrate, what I meant (sorry for the partly German names.). P<sup>2.S.: As I am not a "TeX"-guy, does anyone know how to switch off the superspript mode.. </sup></p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/4083 Trac 1.4.3 Michael Soliman. <boost@…> Sat, 10 Apr 2010 13:01:23 GMT attachment set https://svn.boost.org/trac10/ticket/4083 https://svn.boost.org/trac10/ticket/4083 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">fi.h.gz</span> </li> </ul> <p> I did append the ammended version of "Filter_iterator" in order to illustrate, what I meant (sorry for the partly German names.). </p> Ticket Michael Soliman. <boost@…> Sat, 10 Apr 2010 13:26:19 GMT cc set https://svn.boost.org/trac10/ticket/4083#comment:1 https://svn.boost.org/trac10/ticket/4083#comment:1 <ul> <li><strong>cc</strong> <span class="trac-author">boost@…</span> added </li> </ul> <p> P<sup>3_.S.: Cut &amp; Paste errors prevail. The access-functions should be.: const detail::thread_data_ptr&amp;const_Wert(void)const{return thread_data;}; </sup></p> <blockquote> <p> detail::thread_data_ptr&amp; Wert( void) {return thread_data;}; </p> </blockquote> <p> , of course. _Tschuess, <span class="underline">Michael. </span></p> Ticket Anthony Williams Mon, 07 Jun 2010 08:55:05 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/4083#comment:2 https://svn.boost.org/trac10/ticket/4083#comment:2 <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">wontfix</span> </li> </ul> <p> The details of thread::id are private for a purpose. The internal contents are not intended for public consumption, and providing such access would break encapsulation. </p> <p> thread::id is suitable for use as a key in an associative container, so can be used directly as e.g. a map index. </p> Ticket Michael Soliman. <boost@…> Tue, 08 Jun 2010 10:15:11 GMT status changed; resolution deleted https://svn.boost.org/trac10/ticket/4083#comment:3 https://svn.boost.org/trac10/ticket/4083#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">closed</span> → <span class="trac-field-new">reopened</span> </li> <li><strong>resolution</strong> <span class="trac-field-deleted">wontfix</span> </li> </ul> <p> Moin Moin. Ok.: "not intended for public consumption" does mean, that the authors did not have the plan to do so. My proposal now implies, that a sensible application to do so arose and can be satisfied without removing any degrees of implementing future functionality from the authors' sphere of influence. My proposal just contains </p> Ticket Anthony Williams Tue, 08 Jun 2010 21:37:09 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/4083#comment:4 https://svn.boost.org/trac10/ticket/4083#comment:4 <ul> <li><strong>status</strong> <span class="trac-field-old">reopened</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">wontfix</span> </li> </ul> <p> I disagree that a sensible application for exposing the internals of thread::id has arisen. </p> <p> I will not be changing thread::id to expose the internals. If you wish to use thread::id as an index, create an associative container such as std::map&lt;boost::thread::id,some_data&gt;. </p> Ticket Michael Soliman. <boost@…> Wed, 09 Jun 2010 13:36:43 GMT <link>https://svn.boost.org/trac10/ticket/4083#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4083#comment:5</guid> <description> <p> Moin Moin. </p> <blockquote class="citation"> <blockquote> <p> I disagree that a sensible application for exposing the internals of thread::id has arisen. </p> </blockquote> </blockquote> <p> Hm. Sorry, I did not mean to be pert. My intention was just to remove a circumventable restriction. As it is a small change, I shall be implementing it within the sources all by myself at anytime I am using a new distribution. </p> <blockquote> <p> Tschuess, </p> <blockquote> <p> Michael. </p> </blockquote> </blockquote> </description> <category>Ticket</category> </item> </channel> </rss>