MCT

relink() usage incorrect in section "Implementing a Cache of Limited Size" of documentation

Bug #628974 reported by freshcoast
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MCT
Fix Released
Undecided
Unassigned

Bug Description

In this section, the docs state:
    If the cache is a linked_hash_map, you can use relink() to alter iteration order. For instance, adding:

    cache.relink (entry, cache.end ());

However, the two parameters are reversed. Also, entry is declared as a const_iterator, but if used with relink it must not be const.

Related branches

Revision history for this message
Paul Pogonyshev (doublep) wrote :

Thank you. Swapped args in the code snippet and changed const_iterator to iterator — hardly matters that modifiability is not needed if you don't relink.

Changed in libmct:
status: New → Fix Committed
Changed in libmct:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.