compile problem with std::map::const_iterator
Lars Gullik Bjønnes
larsbj@lyx.org
Sat Oct 14 14:52:00 GMT 2000
larsbj@lyx.org (Lars Gullik Bjønnes) writes:
I can confirm that I still have these problems with
Reading specs from /usr/local/lib/gcc-lib/i586-pc-linux-gnu/2.97/specs
Configured with: --with-gcc-version-trigger=/local/larsbj/gcc/gcc/version.c --host=i586-pc-linux-gnu --enable-libstdcxx-v3 --enable-languages=c++ --enable-shared --norecursion
gcc version 2.97 20001014 (experimental)
Should I post a more formal bug report?
Lgb
| 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
More information about the Libstdc++
mailing list