Boost C++ Libraries: Ticket #4071: unique_lock fails with recent Sun Studio compilers https://svn.boost.org/trac10/ticket/4071 <p> boost/thread/locks.hpp has conditional code applied to all Sun Studio compilers, but recent compilers don't produce the right result with the workarounds. The workarounds should be restricted to older compilers (a one-line change in two places). Here are the diffs: </p> <p> --- boost/thread/locks.hpp (revision 61052) +++ boost/thread/locks.hpp (working copy) @@ -214,7 +214,7 @@ </p> <blockquote> <p> unique_lock&amp; operator=(unique_lock&amp;); unique_lock&amp; operator=(upgrade_lock&lt;Mutex&gt;&amp; other); </p> </blockquote> <blockquote> <p> public: </p> </blockquote> <p> -#ifdef <span class="underline">SUNPRO_CC +#if BOOST_WORKAROUND(</span>SUNPRO_CC, &lt; 0x5100) </p> <blockquote> <p> unique_lock(const volatile unique_lock&amp;); </p> </blockquote> <blockquote> <p> #endif </p> <blockquote> <p> unique_lock(): </p> </blockquote> </blockquote> <p> @@ -300,7 +300,7 @@ </p> <blockquote> <p> return detail::thread_move_t&lt;unique_lock&lt;Mutex&gt; &gt;(*this); </p> </blockquote> <blockquote> <p> } </p> </blockquote> <p> -#ifdef <span class="underline">SUNPRO_CC +#if BOOST_WORKAROUND(</span>SUNPRO_CC, &lt; 0x5100) </p> <blockquote> <p> unique_lock&amp; operator=(unique_lock&lt;Mutex&gt; other) { </p> <blockquote> <p> swap(other); </p> </blockquote> </blockquote> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/4071 Trac 1.4.3 chris_kohlhoff Mon, 05 Apr 2010 21:58:07 GMT component, summary changed; owner set https://svn.boost.org/trac10/ticket/4071#comment:1 https://svn.boost.org/trac10/ticket/4071#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> <li><strong>summary</strong> <span class="trac-field-old">ASIO library fails with recent Sun Studio compilers</span> → <span class="trac-field-new">unique_lock fails with recent Sun Studio compilers</span> </li> </ul> Ticket viboes Wed, 09 Jun 2010 19:12:49 GMT type changed https://svn.boost.org/trac10/ticket/4071#comment:2 https://svn.boost.org/trac10/ticket/4071#comment:2 <ul> <li><strong>type</strong> <span class="trac-field-old">Bugs</span> → <span class="trac-field-new">Patches</span> </li> </ul> Ticket Anthony Williams Thu, 10 Jun 2010 07:45:12 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/4071#comment:3 https://svn.boost.org/trac10/ticket/4071#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 anonymous Mon, 21 Jun 2010 19:48:00 GMT <link>https://svn.boost.org/trac10/ticket/4071#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4071#comment:4</guid> <description> <p> I think the patch got messed up because of wiki formatting, and that should be: </p> <pre class="wiki">#if BOOST_WORKAROUND(__SUNPRO_CC, &lt; 0x5100) </pre><p> This is causing a warning, in <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/4363" title="#4363: Patches: boost/detail warning cleanup (closed: fixed)">#4363</a>. </p> </description> <category>Ticket</category> </item> <item> <author>stephen.clamage@…</author> <pubDate>Mon, 21 Jun 2010 20:04:32 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/4071#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4071#comment:5</guid> <description> <p> Yes, in the wiki view, two lines are merged into one in two places. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Mon, 21 Jun 2010 21:30:50 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/4071#comment:6 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4071#comment:6</guid> <description> <p> I was referring to the <code>__</code> in <code>__SUNPRO_CC</code> which was interpreted as underline markup and was stripped out, which is why the commit used <code>SUNPROC_CC</code> which causes the warning. </p> </description> <category>Ticket</category> </item> </channel> </rss>