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

Bug #628974 reported by freshcoast on 2010-09-02
This bug affects 1 person
Affects Status Importance Assigned to Milestone

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

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  Edit
Everyone can see this information.

Other bug subscribers