Boost C++ Libraries: Ticket #6175: Compile error with SunStudio https://svn.boost.org/trac10/ticket/6175 <p> Version of compiler: CC: Sun C++ 5.10 SunOS_sparc 2009/06/03 </p> <p> A compile error occurs with the above compiler when boost/thread.hpp is included: </p> <pre class="wiki">"./boost/thread/future.hpp", line 422: Error: boost::unique_lock&lt;boost::mutex&gt;::operator=(boost::unique_lock&lt;boost::mutex&gt;&amp;) is not accessible from boost::detail::future_waiter::all_futures_lock::all_futures_lock(std::vector&lt;boost::detail::future_waiter::registered_waiter&gt;&amp;). </pre><p> There is a patch for this issue in the mailinglist: <a class="ext-link" href="http://lists.boost.org/Archives/boost/2011/03/179261.php"><span class="icon">​</span>http://lists.boost.org/Archives/boost/2011/03/179261.php</a> </p> <p> But it is still not committed. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/6175 Trac 1.4.3 viboes Fri, 02 Dec 2011 20:34:49 GMT owner, status changed; cc set https://svn.boost.org/trac10/ticket/6175#comment:1 https://svn.boost.org/trac10/ticket/6175#comment:1 <ul> <li><strong>cc</strong> <span class="trac-author">viboes</span> added </li> <li><strong>owner</strong> changed from <span class="trac-author">Anthony Williams</span> to <span class="trac-author">viboes</span> </li> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> </ul> <p> Please could you check if the following works in your configuration? </p> <p> boost::move(locks[i]=boost::unique_lock&lt;boost::mutex&gt;(futures[i].future-&gt;mutex)); </p> Ticket viboes Sat, 03 Dec 2011 14:07:28 GMT milestone changed; cc deleted https://svn.boost.org/trac10/ticket/6175#comment:2 https://svn.boost.org/trac10/ticket/6175#comment:2 <ul> <li><strong>cc</strong> <span class="trac-author">viboes</span> removed </li> <li><strong>milestone</strong> <span class="trac-field-old">To Be Determined</span> → <span class="trac-field-new">Boost 1.49.0</span> </li> </ul> <p> In order to state clearly that this is a workaround I will use instead </p> <pre class="wiki">#if defined __DECCXX || defined __SUNPRO_CC locks[i]=boost::unique_lock&lt;boost::mutex&gt;(futures[i].future-&gt;mutex).move(); #else locks[i]=boost::unique_lock&lt;boost::mutex&gt;(futures[i].future-&gt;mutex); #endif </pre><p> Let me know if this works for you. </p> <p> Committed in trunk revision 75788. </p> Ticket anonymous Tue, 06 Dec 2011 08:27:40 GMT <link>https://svn.boost.org/trac10/ticket/6175#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6175#comment:3</guid> <description> <p> Yeah, it compiles with this workaround. </p> <p> Is this a good workaround? </p> <p> You could also change the visibility of unique_lock&amp; operator=(unique_lock&amp;) in boost/thread/locks.hpp to public. </p> <p> I think the root of problem has something to do that the sun compiler does not support rvalue references. The define BOOST_NO_RVALUE_REFERENCES is set in boost/config/compiler/sunpro_cc.hpp. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Sat, 10 Dec 2011 11:40:29 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/6175#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6175#comment:4</guid> <description> <p> Please could you open another ticket for the visibility? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Sat, 07 Jan 2012 22:54:27 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/6175#comment:5 https://svn.boost.org/trac10/ticket/6175#comment:5 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> Committed in release at <a class="missing ticket">#76291</a> </p> Ticket