This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the EGCS project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Bug: STL's deque::const_iterator::operator->()



Bug: STL's deque::const_iterator::operator->()

In short, std::deque<T>::const_iterator::operator->() is defined as
returning a reference whereas it should be returning a pointer.  I
downloaded the latest version of STL yesterday from SGI's site and
they've fixed the bug.  However, the GNU copy of this file in
/usr/include/g++/stl_deque.h still has the bug.

Open the above file.  Search for the 3rd occurence of 
"const_iterator" (this is line 266 for me).  The line reads
  typedef __deque_iterator<T, const T&, const T&, BufSiz>  const_iterator;
But it should read
  typedef __deque_iterator<T, const T&, const T*, BufSiz>  const_iterator;

--
----------------------------------
Siemel B. Naran (sbnaran@uiuc.edu)
----------------------------------



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]