This is the mail archive of the
libstdc++@sources.redhat.com
mailing list for the libstdc++ project.
compile problem with std::map::const_iterator
- To: libstdc++ at sources dot redhat dot com
- Subject: compile problem with std::map::const_iterator
- From: larsbj at lyx dot org (Lars Gullik Bjønnes)
- Date: 11 Oct 2000 23:40:26 +0200
tested on libstdc++-v3 as of
Reading specs from /usr/local/lib/gcc-lib/i586-pc-linux-gnu/2.97/specs
gcc version 2.97 20001001 (experimental)
#include <map>
int main()
{
typedef std::map<void *, void *> Cache;
Cache cache;
for (Cache::const_iterator cit = cache.begin();
cit != cache.end(); ++cit) {
;
}
}
This does not compile.
[larsbj@lett test]$ g++ -W -Wall -O2 -o testmap testmap.C
testmap.C: In function `int main()':
testmap.C:10: no match for `std::_Rb_tree_iterator<std::pair<void *const, void
*>, const std::pair<void *const, void *> &, const std::pair<void *const,
void *> *> & != std::_Rb_tree_iterator<std::pair<void *const, void *>,
std::pair<void *const, void *> &, std::pair<void *const, void *> *>'
If I change to use Cache::iterator it compiles.
Unsure if this is user,compiler or lib problem...
Lgb