Uploaded image for project: 'Mesos'
  1. Mesos
  2. MESOS-5037

foreachkey behaviour is not expected in multimap

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • stout

    Description

      Currently the foreachkey implementation is

      #define foreachkey(VAR, COL)                    \
        foreachpair (VAR, __foreach__::ignore, COL)
      

      This works in most structures. But in multimap, one key may map to multi values. This means there are multi pairs which have same key. So when call foreachkey, the key would duplicated when iteration. My idea to solve this is we prefer call foreach on (COL).keys() if keys() method exists in COL.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              haosdent@gmail.com haosdent
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: