Boost C++ Libraries: Ticket #11207: boost::numeric::ublas::shallow_array_adaptor broken when compiling with -DNDEBUG https://svn.boost.org/trac10/ticket/11207 <p> The attached code does not compile with clang++ 3.6, 3.7svn, Xcode's clang++, or g++ 4.9. I get these errors: </p> <pre class="wiki">&gt; /usr/bin/clang++ -DNDEBUG -o broken_shallow_array_adaptor broken_shallow_array_adaptor.cpp -I /opt/local/include In file included from broken_shallow_array_adaptor.cpp:2: In file included from /opt/local/include/boost/numeric/ublas/matrix.hpp:18: In file included from /opt/local/include/boost/numeric/ublas/vector.hpp:21: /opt/local/include/boost/numeric/ublas/storage.hpp:781:9: error: expected member name or ';' after declaration specifiers template &lt;size_t N&gt; ^ /opt/local/include/boost/numeric/ublas/storage.hpp:901:9: error: unknown type name 'const_iterator' const_iterator begin () const { ^ /opt/local/include/boost/numeric/ublas/storage.hpp:905:9: error: unknown type name 'const_iterator' const_iterator cbegin () const { ^ /opt/local/include/boost/numeric/ublas/storage.hpp:909:9: error: unknown type name 'const_iterator' const_iterator end () const { ^ /opt/local/include/boost/numeric/ublas/storage.hpp:913:9: error: unknown type name 'const_iterator' const_iterator cend () const { ^ /opt/local/include/boost/numeric/ublas/storage.hpp:929:39: error: use of undeclared identifier 'const_iterator' typedef std::reverse_iterator&lt;const_iterator&gt; const_reverse_iterator; ^ In file included from broken_shallow_array_adaptor.cpp:2: In file included from /opt/local/include/boost/numeric/ublas/matrix.hpp:18: /opt/local/include/boost/numeric/ublas/vector.hpp:477:27: error: no type named 'const_iterator' in 'boost::numeric::ublas::shallow_array_adaptor&lt;const double&gt;' typedef typename A::const_iterator const_subiterator_type; ~~~~~~~~~~~~^~~~~~~~~~~~~~ broken_shallow_array_adaptor.cpp:11:58: note: in instantiation of template class 'boost::numeric::ublas::vector&lt;double, boost::numeric::ublas::shallow_array_adaptor&lt;const double&gt; &gt;' requested here vector&lt;double, shallow_array_adaptor&lt;const double&gt; &gt; tmp2(10, tmp1); ^ 7 errors generated. </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/11207 Trac 1.4.3 Mark.Moll@… Mon, 20 Apr 2015 14:05:48 GMT attachment set https://svn.boost.org/trac10/ticket/11207 https://svn.boost.org/trac10/ticket/11207 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">broken_shallow_array_adaptor.cpp</span> </li> </ul> Ticket Mark.Moll@… Tue, 21 Apr 2015 21:03:58 GMT <link>https://svn.boost.org/trac10/ticket/11207#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/11207#comment:1</guid> <description> <p> Patch attached. </p> </description> <category>Ticket</category> </item> <item> <author>Mark.Moll@…</author> <pubDate>Tue, 21 Apr 2015 21:04:45 GMT</pubDate> <title>attachment set https://svn.boost.org/trac10/ticket/11207 https://svn.boost.org/trac10/ticket/11207 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">patch_numeric-ublas-storage.hpp.diff</span> </li> </ul> Ticket hugues@… Wed, 13 May 2015 02:43:34 GMT <link>https://svn.boost.org/trac10/ticket/11207#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/11207#comment:2</guid> <description> <p> Thanks Mark for the patch. We are also affected by this bug. </p> <p> Let us know if there is something we can do to help get it merged. </p> <p> Cheers! </p> </description> <category>Ticket</category> </item> <item> <author>hugues@…</author> <pubDate>Thu, 14 May 2015 06:49:49 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/11207#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/11207#comment:3</guid> <description> <p> Hi again: in fact this was fixed in the following pull request: <a class="ext-link" href="https://github.com/uBLAS/ublas/pull/30/files"><span class="icon">​</span>https://github.com/uBLAS/ublas/pull/30/files</a> </p> <p> Cheers! </p> </description> <category>Ticket</category> </item> </channel> </rss>