This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the EGCS project.
Bug: STL's deque::const_iterator::operator->()
- To: egcs-bugs@egcs.cygnus.com
- Subject: Bug: STL's deque::const_iterator::operator->()
- From: "Siemel B. Naran" <sbnaran@physics.uiuc.edu>
- Date: Thu, 29 Jul 1999 12:17:16 -0500 (CDT)
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)
----------------------------------