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


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

1.1b: g++ won't make sets of some iterators


[This problem has been reported as a bug through the Debian bugtracking
system (http://www.debian.org/Bugs/); please Cc: 27266@bugs.debian.org on
on-topic replies]

OS: Linux 2.0.35
Architecture: i686
egcs: 1.1b
libc: GNU libc 2.0.7 (aka libc6)

See the report attached.

Greetings,
-- 
Ray Dassen <jdassen@wi.LeidenUniv.nl>


Package: g++
Version: 2.90.29-0.6

egcs-version: 1.0.3a-0.6

G++ will not allow me to make sets of some kinds of iterators.  The following
code illustrates this problem:

===============================================================================
#include <list.h>
#include <set.h>
#include <vector.h>
#include <stdio.h>

void test(void)
{
    typedef list<int>                   SceneList;
//  typedef set<int>                    SceneList;
//  typedef vector<int>                 SceneList;

    typedef SceneList::const_iterator   ModelIndex;
    typedef set<ModelIndex>             ModelSet;

    ModelSet                            models;
    ModelIndex                          index;

    if (models.find(index) == models.end()) {
        printf("empty\n");
    }
}
-------------------------------------------------------------------------------
dragon:~/tmp> g++ bug.cc
/usr/include/g++/stl_function.h: In method `bool less<__list_iterator<int,const int &,const int *> >::operator ()(const struct __list_iterator<int,const int &,const int *> &, const struct __list_iterator<int,const int &,const int *> &) const':
/usr/include/g++/stl_function.h:100: no match for `const __list_iterator<int,const int &,const int *> & < const __list_iterator<int,const int &,const int *> &'
===============================================================================

Making "SceneList" a set also causes an error, but making it a vector causes
everything to compile okay.

                                          Brian
                                 ( bcwhite@verisim.com )

-------------------------------------------------------------------------------
   Tired of spam?  See what you can do to fight it at: http://www.cauce.org/




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