- To: Debian Bugs <submit at bugs dot debian dot org>
- Subject: Bug#27266: g++ won't make sets of some iterators
- From: Brian White <bcwhite at verisim dot com>
- Date: Wed, 30 Sep 1998 11:37:07 -0400
- MBOX-Line: From iwj@debian.org Wed Sep 30 11:28:59 1998
- Old-X-Loop: owner@bugs.debian.org
- Organization: Verisim, Inc. http://www.verisim.com/
- Orignal-Sender: bcwhite
- Reply-To: Brian White <bcwhite at verisim dot com>, 27266 at bugs dot debian dot org
- Resent-CC: Galen Hazelwood <galenh-egcs at debian dot org>
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/