Boost C++ Libraries: Ticket #215: compiler error using multi_array w/ <algorithm> https://svn.boost.org/trac10/ticket/215 <pre class="wiki">[boost 1.30.2, gcc3.3.2] Hi there, when using multi_array I get compile time errors if I try to use them with &lt;algorithm&gt; like this: #include &lt;algorithm&gt; #include &lt;boost/multi_array.hpp&gt; int main () { //straight from the docs typedef boost::multi_array&lt;double, 3&gt; array_type; typedef array_type::extent_range range; array_type::extent_gen extents; array_type A(extents[2][3][4]); //each of those will fail with //enough errors to fill a novel //read access std::find(A.begin(), A.end(), 42.); //write access std::fill(A.begin(), A.end(), 42.); } Is it my fault? I tried it with boost/array.hpp and it worked, so I assumed it should work with multi-array, too. So there are three possibilities: 1.) I am a fool 2.) multi_array fools me 3.) gcc fools me or any combination of those; could someone de-fool the situation? :-) compiler output attached </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/215 Trac 1.4.3 david_abrahams Sat, 29 Nov 2003 17:55:44 GMT status changed https://svn.boost.org/trac10/ticket/215#comment:1 https://svn.boost.org/trac10/ticket/215#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> </ul> <pre class="wiki">Logged In: YES user_id=52572 The iterators of a three-dimensional multi_array iterate over two-dimensional subarrays, not over floats. Does that help? </pre> Ticket dtrauma Sun, 30 Nov 2003 00:32:01 GMT <link>https://svn.boost.org/trac10/ticket/215#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/215#comment:2</guid> <description> <pre class="wiki">Logged In: YES user_id=590875 So it was 1.), indeed. After re-reading the docs, I think I got misled by the Reference Manual, Invariants: "Iteration through the range [a.begin(),a.end()) will traverse across every value_type of a." After reading the definition of value_type, it all gets clear. Too bad, I'll have to get me another container, then. Thanks for the quick help, sorry for the entropy in your inbox. </pre> </description> <category>Ticket</category> </item> </channel> </rss>