<div><font face="arial, helvetica, sans-serif">Hi,</font></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif">I have trouble compiling the following trivial boost program</font></div>

<div><br></div><div><div><font face="'courier new', monospace" size="1">#include <boost/thread/thread.hpp></font></div><div><font face="'courier new', monospace" size="1"><br>
</font></div><div><font face="'courier new', monospace" size="1">int main()</font></div><div><font face="'courier new', monospace" size="1">{</font></div><div>
<font face="'courier new', monospace" size="1">  return 0;</font></div><div><font face="'courier new', monospace" size="1">}</font></div></div><div><br></div>
<div>Actually, clang and libc++ work perfectly fine:</div><div><br></div><div><font face="'courier new', monospace" size="1">[ryuta@oroppas]$ clang++ -stdlib=libc++ ./boost_thread.cpp</font></div>
<div><font face="'courier new', monospace" size="1"><br></font></div><div><font face="arial, helvetica, sans-serif">However, once we deploy -std=c++0x flag,</font></div>
<div><font face="'courier new', monospace" size="1"><br></font></div><div><font face="'courier new', monospace" size="1">[ryuta@oroppas]$ clang++ -std=c++0x -stdlib=libc++ ./boost_thread.cpp </font></div>

<div><font face="'courier new', monospace" size="1">In file included from ./boost_thread.cpp:1:</font></div><div><font face="'courier new', monospace" size="1">In file included from /usr/include/boost/thread/thread.hpp:17:</font></div>

<div><font face="'courier new', monospace" size="1">/usr/include/boost/thread/pthread/thread_data.hpp:36:17: error: call to deleted constructor of 'boost::shared_ptr<boost::detail::tss_cleanup_function>'</font></div>

<div><font face="'courier new', monospace" size="1">                func(func_),value(value_)</font></div><div><font face="'courier new', monospace" size="1">                ^    ~~~~~</font></div>
<div><font face="'courier new', monospace" size="1">/usr/include/boost/smart_ptr/shared_ptr.hpp:164:25: note: function has been explicitly marked deleted here</font></div><div><font face="'courier new', monospace" size="1">template<class T> class shared_ptr</font></div>

<div><font face="'courier new', monospace" size="1">                        ^</font></div><div><font face="'courier new', monospace" size="1">In file included from ./boost_thread.cpp:1:</font></div>
<div><font face="'courier new', monospace" size="1">In file included from /usr/include/boost/thread/thread.hpp:22:</font></div><div><font face="'courier new', monospace" size="1">/usr/include/boost/thread/detail/thread.hpp:395:13: error: call to deleted constructor of 'detail::thread_data_ptr'</font></div>

<div><font face="'courier new', monospace" size="1">      (aka 'shared_ptr<boost::detail::thread_data_base>')</font></div><div><font face="'courier new', monospace" size="1">            thread_data(thread_data_)</font></div>

<div><font face="'courier new', monospace" size="1">            ^           ~~~~~~~~~~~~</font></div><div><font face="'courier new', monospace" size="1">/usr/include/boost/smart_ptr/shared_ptr.hpp:464:36: note: function has been explicitly marked deleted here</font></div>

<div><font face="'courier new', monospace" size="1">    template<class Y> friend class shared_ptr;</font></div><div><font face="'courier new', monospace" size="1">                                   ^</font></div>

<div><font face="'courier new', monospace" size="1">/usr/include/boost/smart_ptr/shared_ptr.hpp:301:9: error: functional-style cast from 'const boost::shared_ptr<boost::detail::thread_data_base>' to 'this_type'</font></div>

<div><font face="'courier new', monospace" size="1">      (aka 'shared_ptr<boost::detail::thread_data_base>') uses deleted function</font></div><div><font face="'courier new', monospace" size="1">        this_type(r).swap(*this);</font></div>

<div><font face="'courier new', monospace" size="1">        ^~~~~~~~~~~</font></div><div><font face="'courier new', monospace" size="1">/usr/include/boost/thread/detail/thread.hpp:181:24: note: in instantiation of member function 'boost::shared_ptr<boost::detail::thread_data_base>::operator='</font></div>

<div><font face="'courier new', monospace" size="1">      requested here</font></div><div><font face="'courier new', monospace" size="1">            thread_info=other.thread_info;</font></div>
<div><font face="'courier new', monospace" size="1">                       ^</font></div><div><font face="'courier new', monospace" size="1">/usr/include/boost/smart_ptr/shared_ptr.hpp:464:36: note: candidate constructor (the implicit copy constructor) has been explicitly deleted</font></div>

<div><font face="'courier new', monospace" size="1">    template<class Y> friend class shared_ptr;</font></div><div><font face="'courier new', monospace" size="1">                                   ^</font></div>

<div><font face="'courier new', monospace" size="1">/usr/include/boost/smart_ptr/shared_ptr.hpp:227:5: note: candidate constructor [with Y = boost::detail::thread_data_base]</font></div><div>
<font face="'courier new', monospace" size="1">    shared_ptr( shared_ptr<Y> const & r, typename boost::detail::sp_enable_if_convertible<Y,T>::type = boost::detail::sp_empty() )</font></div>
<div><font face="'courier new', monospace" size="1">    ^</font></div><div><font face="'courier new', monospace" size="1">3 errors generated.</font></div><div>
<br></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif">I'm not sure if this could be a boost / clang / libc++ bug.</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif">Any comment will be greatly appreciated.</font></div>
<div><font class="Apple-style-span" face="arial, helvetica, sans-serif"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif">Thanks,</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif"><br>
</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif">Ryuta</font></div>