Boost C++ Libraries: Ticket #3761: Thread ignores BOOST_NO_MEMBER_TEMPLATE_FRIENDS https://svn.boost.org/trac10/ticket/3761 <p> class thread::id in boost/thread/detail/thread.hpp has template friend operator &lt;&lt; </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/3761 Trac 1.4.3 Yuriy A. Krasnoschek <aka.rider@…> Sat, 12 Dec 2009 18:07:16 GMT attachment set https://svn.boost.org/trac10/ticket/3761 https://svn.boost.org/trac10/ticket/3761 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">thread.diff</span> </li> </ul> Ticket Steven Watanabe Mon, 14 Dec 2009 22:55:43 GMT component changed; owner set https://svn.boost.org/trac10/ticket/3761#comment:1 https://svn.boost.org/trac10/ticket/3761#comment:1 <ul> <li><strong>owner</strong> set to <span class="trac-author">Anthony Williams</span> </li> <li><strong>component</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">thread</span> </li> </ul> Ticket anonymous Sun, 06 Jun 2010 12:36:46 GMT type changed https://svn.boost.org/trac10/ticket/3761#comment:2 https://svn.boost.org/trac10/ticket/3761#comment:2 <ul> <li><strong>type</strong> <span class="trac-field-old">Bugs</span> → <span class="trac-field-new">Patches</span> </li> </ul> <p> Another possibility could be to define a public print function which is used by the operator&lt;&lt; </p> <p> +# ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS </p> <blockquote> <p> template&lt;class charT, class traits&gt; friend std::basic_ostream&lt;charT, traits&gt;&amp; </p> </blockquote> <ul><li> operator&lt;&lt;(std::basic_ostream&lt;charT, traits&gt;&amp; os, const id&amp; x) </li></ul><p> + operator&lt;&lt; +# else + template&lt;class charT, class traits&gt; + static std::basic_ostream&lt;charT, traits&gt;&amp; + print +# endif + (std::basic_ostream&lt;charT, traits&gt;&amp; os, const id&amp; x) </p> <p> +# ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS + template&lt;class charT, class traits&gt; + std::basic_ostream&lt;charT, traits&gt;&amp; + operator&lt;&lt;(std::basic_ostream&lt;charT, traits&gt;&amp; os, const thread::id&amp; x) + { + return thread::id::print(os, x); + } +# endif </p> Ticket Anthony Williams Thu, 10 Jun 2010 08:35:04 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/3761#comment:3 https://svn.boost.org/trac10/ticket/3761#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> </ul> <p> Fixed on trunk. </p> Ticket