Opened 8 years ago
Last modified 7 years ago
#11207 new Bugs
boost::numeric::ublas::shallow_array_adaptor broken when compiling with -DNDEBUG
| Reported by: | Owned by: | Douglas Gregor | |
|---|---|---|---|
| Milestone: | To Be Determined | Component: | numeric |
| Version: | Boost 1.58.0 | Severity: | Problem |
| Keywords: | Cc: |
Description
The attached code does not compile with clang++ 3.6, 3.7svn, Xcode's clang++, or g++ 4.9. I get these errors:
> /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 <size_t N>
^
/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<const_iterator> 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<const double>'
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<double, boost::numeric::ublas::shallow_array_adaptor<const
double> >' requested here
vector<double, shallow_array_adaptor<const double> > tmp2(10, tmp1);
^
7 errors generated.
Attachments (2)
Change History (5)
by , 8 years ago
| Attachment: | broken_shallow_array_adaptor.cpp added |
|---|
comment:1 by , 8 years ago
by , 8 years ago
| Attachment: | patch_numeric-ublas-storage.hpp.diff added |
|---|
comment:2 by , 7 years ago
Thanks Mark for the patch. We are also affected by this bug.
Let us know if there is something we can do to help get it merged.
Cheers!
comment:3 by , 7 years ago
Hi again: in fact this was fixed in the following pull request: https://github.com/uBLAS/ublas/pull/30/files
Cheers!
Note:
See TracTickets
for help on using tickets.

Patch attached.