Opened 10 years ago

Closed 10 years ago

#7233 closed Bugs (fixed)

erase does not work on fibonacci_heap

Reported by: Carl Sung <phsung@…> Owned by: timblechmann
Milestone: To Be Determined Component: heap
Version: Boost 1.49.0 Severity: Problem
Keywords: Cc:

Description

erase(handle_type) doesn't work when heap::fibonacci_heap has only one element. I guess this could be fixed by checking empty() before calling consolidate(), like pop() does.

The bug can be reproduced by:

boost::heap::fibonacci_heap<int> fh;

boost::heap::fibonacci_heap<int>::handle_type h1 = fh.push(3); fh.erase(h1);

Change History (2)

comment:1 by timblechmann, 10 years ago

fixed in trunk! thanks for reporting

comment:2 by timblechmann, 10 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.