Defining iterators
From: Deke (Deke_at_nospam.com)
Date: 05/30/04
- Next message: Denis Remezov: "Re: int overflow question"
- Previous message: Paul Mensonides: "Re: #define versus const"
- Next in thread: Denis Remezov: "Re: Defining iterators"
- Reply: Denis Remezov: "Re: Defining iterators"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 30 May 2004 02:35:04 -0400
I upgraded to gcc 3.4 and ran into the problem below. I don't understand
it and need to fix this quickly. Any resolutions in changing to code
will be appreciated. I will research this later this week as time allows
but a quick resolution with code example will help a great deal.
Thanks
-------------
crt/crtmap.hpp:17: error: type `std::map<K, D, C,
std::allocator<std::pair<const _Key, _Tp> > >
' is not derived from type `CRTMap<K, D, C>'
crt/crtmap.hpp:17: error: ISO C++ forbids declaration of `iterator' with
no type
crt/crtmap.hpp:17: error: expected `;' before "iterator"
crt/crtmap.hpp:18: error: type `std::map<K, D, C,
std::allocator<std::pair<const _Key, _Tp> > >
' is not derived from type `CRTMap<K, D, C>'
crt/crtmap.hpp:18: error: ISO C++ forbids declaration of
`const_iterator' with no type
crt/crtmap.hpp:18: error: expected `;' before "const_iterator"
------
template <class K,class D,class C>
class CRTMap
{
private:
mutable std::map<K,D,C> mymap;
mutable CRTMLock MLock;
public:
typedef std::map<K,D,C>::iterator iterator; // line 17
typedef std::map<K,D,C>::const_iterator const_iterator; // line 18
- Next message: Denis Remezov: "Re: int overflow question"
- Previous message: Paul Mensonides: "Re: #define versus const"
- Next in thread: Denis Remezov: "Re: Defining iterators"
- Reply: Denis Remezov: "Re: Defining iterators"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|