[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#244894: libstdc++5-3.3-dev: const_reverse_iterators seem to be broken



Package: libstdc++5-3.3-dev
Version: 1:3.3.3-6
Severity: normal

please inspect the following code:

  BEGIN ri.cpp
  #include <list>

  int main() {
    std::list<int> l;
    std::list<int>::iterator i = l.begin();
    std::list<int>::const_iterator ci = l.begin();
    std::list<int>::reverse_iterator ri = l.rbegin();
    std::list<int>::const_reverse_iterator cri = l.rbegin();

    if (i == l.end());
    if (ci == l.end());
    if (ri == l.rend());
    if (cri == l.rend());

    return 0;
  }
  END

compiling this: `g++ -o ri ri.cpp` (g++ (GCC) 3.3.3 (Debian 20040401))

yields the following error:

  ri.cpp: In function `int main()':
  ri.cpp:13: error: no match for 'operator==' in 'cri == std::list<_Tp, 
    _Alloc>::rend() [with _Tp = int, _Alloc = std::allocator<int>]()'

The same holds for std::vector and possibly other types. This means
that const_reverse_iterators appear to be broken.

-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (600, 'testing'), (98, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.3-1-k7-smp
Locale: LANG=en_GB.ISO-8859-15, LC_CTYPE=de_DE.ISO-8859-15

Versions of packages libstdc++5-3.3-dev depends on:
ii  g++-3.3                     1:3.3.3-6    The GNU C++ compiler
ii  gcc-3.3-base                1:3.3.3-6    The GNU Compiler Collection (base 
ii  libc6-dev                   2.3.2.ds1-11 GNU C Library: Development Librari
ii  libstdc++5                  1:3.3.3-6    The GNU Standard C++ Library v3

-- no debconf information

-- 
Please do not CC me when replying to lists; I read them!
 
 .''`.     martin f. krafft <madduck@debian.org>
: :'  :    proud Debian developer, admin, and user
`. `'`
  `-  Debian - when you have better things to do than fixing a system
 
Invalid/expired PGP subkeys? Use subkeys.pgp.net as keyserver!

Attachment: signature.asc
Description: Digital signature


Reply to: