<div>Hi,</div><div><br></div>I bet the problem is in boost implementation but<div>I'm not 100% sure whether the issue is really on boost side or not.<div><br></div><div>Compiling the following code</div><div><br></div>
<div>$ cat boost_thread.cpp</div><div><br></div><div><div>#include <boost/thread.hpp></div><div><br></div><div>int main()</div><div>{</div><div>  return 0;</div><div>}</div></div><div><br></div><div>$ clang++ -stdlib=libc++ ./boost_thread.cpp</div>
<div><br></div><div><div>In file included from ./boost_thread.cpp:1:</div><div>In file included from /usr/include/boost/thread.hpp:24:</div><div>In file included from /usr/include/boost/thread/future.hpp:14:</div><div>In file included from /usr/include/boost/exception_ptr.hpp:9:</div>
<div>In file included from /usr/include/boost/exception/detail/exception_ptr.hpp:19:</div><div>In file included from /usr/include/boost/exception/info.hpp:15:</div><div>In file included from /usr/include/boost/exception/to_string_stub.hpp:15:</div>
<div>In file included from /usr/include/boost/exception/detail/object_hex_dump.hpp:14:</div><div>/usr/include/boost/exception/detail/type_info.hpp:53:9: error: cannot define the implicit default assignment operator for</div>
<div>      'boost::exception_detail::type_info_', because non-static reference member 'type_' can't use default assignment operator</div><div>        type_info_</div><div>        ^</div><div>/usr/include/c++/v1/__tree:1244:35: note: in instantiation of member function 'std::__1::pair<boost::exception_detail::type_info_,</div>
<div>      boost::shared_ptr<boost::exception_detail::error_info_base> >::operator=' requested here</div><div>                __cache->__value_ = *__first;</div><div>                                  ^</div>
<div>/usr/include/c++/v1/__tree:1185:9: note: in instantiation of function template specialization</div><div>      'std::__1::__tree<std::__1::pair<boost::exception_detail::type_info_, boost::shared_ptr<boost::exception_detail::error_info_base> >,</div>
<div>      std::__1::__map_value_compare<boost::exception_detail::type_info_, boost::shared_ptr<boost::exception_detail::error_info_base>,</div><div>      std::__1::less<boost::exception_detail::type_info_>, true>, std::__1::allocator<std::__1::pair<boost::exception_detail::type_info_,</div>
<div>      boost::shared_ptr<boost::exception_detail::error_info_base> > ></div><div>      >::__assign_multi<std::__1::__tree_const_iterator<std::__1::pair<boost::exception_detail::type_info_,</div>
<div>      boost::shared_ptr<boost::exception_detail::error_info_base> >, const std::__1::__tree_node<std::__1::pair<boost::exception_detail::type_info_,</div><div>      boost::shared_ptr<boost::exception_detail::error_info_base> >, void *> *, long> >' requested here</div>
<div>        __assign_multi(__t.begin(), __t.end());</div><div>        ^</div><div>/usr/include/c++/v1/map:760:21: note: in instantiation of member function 'std::__1::__tree<std::__1::pair<boost::exception_detail::type_info_,</div>
<div>      boost::shared_ptr<boost::exception_detail::error_info_base> >, std::__1::__map_value_compare<boost::exception_detail::type_info_,</div><div>      boost::shared_ptr<boost::exception_detail::error_info_base>, std::__1::less<boost::exception_detail::type_info_>, true>,</div>
<div>      std::__1::allocator<std::__1::pair<boost::exception_detail::type_info_, boost::shared_ptr<boost::exception_detail::error_info_base> > > >::operator='</div><div>      requested here</div>
<div>            __tree_ = __m.__tree_;</div><div>                    ^</div><div>/usr/include/boost/exception/info.hpp:160:26: note: in instantiation of member function 'std::__1::map<boost::exception_detail::type_info_,</div>
<div>      boost::shared_ptr<boost::exception_detail::error_info_base>, std::__1::less<boost::exception_detail::type_info_>,</div><div>      std::__1::allocator<std::__1::pair<const boost::exception_detail::type_info_, boost::shared_ptr<boost::exception_detail::error_info_base> > ></div>
<div>      >::operator=' requested here</div><div>                c->info_ = info_;</div><div>                         ^</div><div>/usr/include/boost/exception/detail/type_info.hpp:55:41: note: declared here</div>
<div>            detail::sp_typeinfo const & type_;</div><div>                                        ^</div><div>/usr/include/c++/v1/utility:247:15: note: implicit default copy assignment operator for 'boost::exception_detail::type_info_' first required here</div>
<div>        first = __p.first;</div><div>              ^</div><div>1 error generated.</div></div><div><br></div></div><div>===================================</div><div><br></div><div>Since</div><div><br></div><div>$ clang++ -stdlib=libstdc++ ./boost_thread.cpp</div>
<div><br></div><div>has worked perfectly fine my guess is that boost_thread.hpp doesn't strictly conform to the standard.</div><div><meta http-equiv="content-type" content="text/html; charset=utf-8"><br></div><div>Any comment will be appreciated.</div>
<div><br></div><div>Thanks,</div><div><br></div><div>Ryuta</div><div><br></div><div>p.s.</div><div><br></div><div>My boost library is 1.46.1.</div>