[SERVER-14960] Make UnorderedFastKeyTable::const_iterator STL-compliant Created: 19/Aug/14  Updated: 08/Jan/24  Resolved: 29/Nov/18

Status: Closed
Project: Core Server
Component/s: Internal Code
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Minor - P4
Reporter: Adam Midvidy Assignee: Backlog - Service Architecture
Resolution: Won't Fix Votes: 0
Labels: community-team
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Service Arch
Participants:

 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


Generated at Thu Feb 08 03:36:29 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.