Defining iterators

From: Deke (Deke_at_nospam.com)
Date: 05/30/04


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



Relevant Pages

  • Re: Defining iterators
    ... > I upgraded to gcc 3.4 and ran into the problem below. ... > it and need to fix this quickly. ... Any resolutions in changing to code ... It's become quite a FAQ that is not yet in The FAQ. ...
    (comp.lang.cpp)
  • Re: Cant switch resolution
    ... resolutions with Ctrl Alt + or Ctrl Alt - any more. ... ....shows I have 4 Modes defined at obvious resolutions. ... resolutions at all, so if that's the case, fix your conf file. ...
    (comp.os.linux.x)
  • Re: Output to TV is crooked PLEASE HELP!
    ... Here are resolutions different TV standards.. ... (translations from FI/SE not always accurate) ... > I have been looking all over for a fix for this and I just cant find ... I have the resolution set at 800 x 600 and have tried all ...
    (alt.comp.hardware.pc-homebuilt)
  • Re: Office 2007 beta 2 Setup Error
    ... I'm glad I am not the only one experiencing this problem. ... I haven't seen any resolutions to the problem. ... Has any managed to fix this? ... the network or CD-Rom drive. ...
    (microsoft.public.office.setup)