
6 Jun
2011
6 Jun
'11
1:31 p.m.
FWIW, I also found Heap::merge() and Heap::merge_and_clear() «somewhat odd» and was left wondering why not overload ::insert() (which copies elements from a source) and reuse splice() name from std::list<> which moves nodes from one container to the other.
That's because the operations are commonly called merge and union in the literature. It's best to follow precedent. Andrew