<div class="gmail_quote">On Fri, Dec 14, 2012 at 5:02 AM, Jiri Vyskocil <span dir="ltr">&lt;<a href="mailto:svzj@centrum.cz" target="_blank">svzj@centrum.cz</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Sun, 2012-12-09 at 22:40 -0800, Jeffrey Lee Hellrung, Jr. wrote:<br>
<br>
- See if a std::vector&lt; boost::intrusive::list &gt; works.<br>
&gt;<br>
This construction compiles and works with gcc 4.7.2 in C++11 mode only.<br>
With wersion 4.7.2 in default mode and 4.6 in any mode, compilation<br>
fails with a similar error.<br>
<br>
- See if a boost::multi_array&lt; boost::container::vector &gt; works.<br>
&gt;<br>
This compiles and works fine in both 4.6 and 4.7, even in non-C++11 mode<br>
<br>
If the above nesting of data structures gives similar errors as the<br>
original combination (something about unavailability of a copy<br>
constructor and/or stuff involving boost::rv&lt;&gt;), then that would seem to<br>
confirm it&#39;s a Boost.Move + Boost.MultiArray incompatibility. At that<br>
point, the best options are either to patch Boost.MultiArray to be<br>
Boost.Move-aware (not sure how much work that would be...) or try gcc<br>
4.7.x, where maybe Boost.Move would no longer have adverse effects (if<br>
rvalue references are enabled by default; I don&#39;t know actually if<br>
that&#39;s the case).<br>
&gt;<br>
GCC 4.7.2 won&#39;t compile the MultiArray of intrusive lists even in C++11<br>
mode. It spews the same error as gcc 4.6 in C++0x mode:<br>
<br>
/usr/include/boost/intrusive/list.hpp:1488:4: error:<br>
‘boost::intrusive::list&lt;T, O1, O2, O3&gt;::list(const<br>
boost::intrusive::list&lt;T, O1, O2, O3&gt;&amp;) [with T = Particle, O1 =<br>
boost::intrusive::none, O2 = boost::intrusive::none, O3 =<br>
boost::intrusive::none, boost::intrusive::list&lt;T, O1, O2, O3&gt; =<br>
boost::intrusive::list&lt;Particle&gt;]’ is private<br>
<br>
It would be nice to have this working at least in the newer gcc, but I<br>
have no idea what to look for...<br></blockquote><div><br>Ah, evidently boost::multiarray expects its value_type to be copy-constructible (at least), which Boost.Intrusive data structures are not [1]: &quot;Boost.Intrusive containers are non-copyable and non-assignable.&quot; Also explains the failure of std::vector&lt; boost::intrusive::list &gt;, too, in C++03 mode. In C++11 mode, I guess std::vector (and similar) are able to fall back to using the move constructors and assignment operators of the Boost.Intrusive data structures.<br>
<br>- Jeff<br><br>[1] <a href="http://www.boost.org/doc/libs/1_52_0/doc/html/intrusive/intrusive_vs_nontrusive.html">http://www.boost.org/doc/libs/1_52_0/doc/html/intrusive/intrusive_vs_nontrusive.html</a><br><br></div></div>

