Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-14960

Make UnorderedFastKeyTable::const_iterator STL-compliant

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Internal Code
    • Labels:
    • Service Arch

      Currently the const_iterator of UnorderedFastKeyTable ("UFKT") is not STL-compliant. This makes it a compiler error to fill an STL container using UFKT iterators, e.g.

      StringMap<int> foo; // just a typedef'd UKFT
      // do stuff with foo ...
      std::vector<std::pair<std::string, int>> bar(foo.begin(), foo.end())
      

      To fix this it is necessary to add these typedefs to the definition of UFKT::const_iterator :

      iterator_category
      value_type
      difference_type
      pointer
      reference

            Assignee:
            backlog-server-servicearch [DO NOT USE] Backlog - Service Architecture
            Reporter:
            adam.midvidy Adam Midvidy
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: