std::string const& MRUManager::GetEntry(std::string const& key, const size_t entry) { const MRUManager::MRUListMap *const map = Get(key); if (entry >= map->size()) throw MRUErrorIndexOutOfRange("Requested element index is out of range."); return *next(map->begin(), entry); }
std::string const& MRUManager::GetEntry(const std::string &key, size_t entry) { const MRUManager::MRUListMap *map = Get(key); if (entry > map->size()) throw MRUErrorIndexOutOfRange("Requested element index is out of range."); MRUListMap::const_iterator index = map->begin(); advance(index, entry); return *index; }