map that maps to iterators in the same map ?

Discussion in 'C++' started by Vlad, Dec 15, 2003.

  1. Vlad

    Vlad Guest

    Hi,
    I wonder if it's possible to implement something like

    typedef map<string, T::iterator> T;

    i.e. to have a map that will resolve keys to iterators in the map of the
    same type.

    In my situation, I'll have only one such map and can guarantee that all
    iterators will remain valid (I'll only add stuff).

    Do such recursive constructions known to cause problems? I can use
    pointers instead of iterators, but it will be much uglier.

    Thanks,
    Vladimir
    Vlad, Dec 15, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Simon Elliott
    Replies:
    4
    Views:
    1,155
    Simon Elliott
    Mar 10, 2005
  2. Sheep
    Replies:
    1
    Views:
    391
    Sheep
    Aug 14, 2006
  3. Marcus
    Replies:
    2
    Views:
    585
    Marcus
    Dec 9, 2005
  4. Replies:
    4
    Views:
    278
    Thorsten Kiefer
    Jul 29, 2006
  5. ittium
    Replies:
    4
    Views:
    312
    ittium
    Dec 8, 2011
Loading...

Share This Page