[libstdc++] Problems with priority_queues (patch included)
Peter Schmid
schmid@snake.iap.physik.tu-darmstadt.de
Fri Dec 28 14:30:00 GMT 2001
Code employing priority_queues does not compile on the main
line. Fixed by the attached patch.
Hope this helps
Peter Schmid
gcc -v p p.C -W -Wall
Reading specs from /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.1/specs
Configured with: ../gcc/configure --enable-shared --disable-nls --enable-threads --enable-languages=c,c++,f77,objc --enable-concept-checks
Thread model: posix
gcc version 3.1 20011225 (experimental)
/usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.1/cc1plus -v -D__GNUC__=3 -D__GNUC_MINOR__=1 -D__GNUC_PATCHLEVEL__=0 -D__ELF__ -Dunix -Dlinux -D__ELF__ -D__unix__ -D__linux__ -D__unix -D__linux -Asystem=posix -D__NO_INLINE__ -D__STDC_HOSTED__=1 -W -Wall -D_GNU_SOURCE -Acpu=i386 -Amachine=i386 -Di386 -D__i386 -D__i386__ -D__tune_i686__ -D__tune_pentiumpro__ p.C -D__GNUG__=3 -D__DEPRECATED -D__EXCEPTIONS -D__GXX_ABI_VERSION=100 -quiet -dumpbase p.C -W -Wall -version -o /tmp/ccDKe6OZ.s
GNU CPP version 3.1 20011225 (experimental) (cpplib) (i386 Linux/ELF)
GNU C++ version 3.1 20011225 (experimental) (i686-pc-linux-gnu)
compiled by GNU C version 3.1 20011225 (experimental).
ignoring nonexistent directory "NONE/include"
ignoring nonexistent directory "/usr/local/i686-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/local/include/g++-v3
/usr/local/include/g++-v3/i686-pc-linux-gnu
/usr/local/include/g++-v3/backward
/usr/local/include
/usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.1/include
/usr/include
End of search list.
/usr/local/include/g++-v3/bits/stl_iterator.h: In member function
`std::reverse_iterator<_Iterator>&
std::reverse_iterator<_Iterator>::operator-=(typename
std::iterator_traits<_Iterator>::difference_type) [with _Iterator =
std::__normal_iterator<const float*, std::vector<float,
std::allocator<float> > >]':
/usr/local/include/g++-v3/bits/boost_concept_check.h:504: instantiated from `void __gnu_cxx::_RandomAccessIteratorConcept<_Tp>::__constraints() [with _Tp = std::reverse_iterator<std::__normal_iterator<const float*, std::vector<float, std::allocator<float> > > >]'
/usr/local/include/g++-v3/bits/boost_concept_check.h:36: instantiated from `void __gnu_cxx::__function_requires() [with _Concept = __gnu_cxx::_RandomAccessIteratorConcept<std::reverse_iterator<std::__normal_iterator<const float*, std::vector<float, std::allocator<float> > > > >]'
/usr/local/include/g++-v3/bits/boost_concept_check.h:649: instantiated from `void __gnu_cxx::_RandomAccessContainerConcept<_RandomAccessContainer>::__constraints() [with _RandomAccessContainer = std::vector<float, std::allocator<float> >]'
/usr/local/include/g++-v3/bits/stl_queue.h:170: instantiated from `std::priority_queue<float, std::vector<float, std::allocator<float> >, std::less<float> >'
p.C:5: instantiated from here
/usr/local/include/g++-v3/bits/stl_iterator.h:158: `_M_current' undeclared
(first use this function)
/usr/local/include/g++-v3/bits/stl_iterator.h:158: (Each undeclared identifier
is reported only once for each function it appears in.)
2001-10-25 Peter Schmid <schmid@snake.iap.physik.tu-darmstadt.de>
* libstdc++-v3/include/bits/stl_iterator.h: Rename _M_current
to current
*** libstdc++-v3/include/bits/stl_iterator.h.orig Fri Dec 28 22:55:09 2001
--- libstdc++-v3/include/bits/stl_iterator.h Fri Dec 28 22:55:28 2001
*************** namespace std
*** 155,161 ****
reverse_iterator&
operator-=(difference_type __n)
{
! _M_current += __n;
return *this;
}
--- 155,161 ----
reverse_iterator&
operator-=(difference_type __n)
{
! current += __n;
return *this;
}
More information about the Gcc-bugs
mailing list