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

Make UnorderedFastKeyTable::const_iterator STL-compliant

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Icon: Minor - P4 Minor - P4
    • None
    • None
    • Internal Code
    • Service Arch

    Description

      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

      Attachments

        Activity

          People

            backlog-server-servicearch Backlog - Service Architecture
            adam.midvidy Adam Midvidy
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: