
On Fri, Nov 11, 2005 at 10:15:51AM -0800, Jeremy Y. Meng wrote:
On Sat, Nov 12, 2005 at 04:19:24AM +1100, Peter Moulder wrote:
+++ inkscape_irix/src/libavoid/makepath.cpp 2005-11-09 14:19:52.346046320 -0800
I'll add #include <algorithm> and `using' statements for make_heap, push_heap, pop_heap.
No, please do not #include <algorithm>. It was my mistake to introduce it. std::-prefixing *_heap() would be enough.
Chapter 25 ‘Algorithms library’ of the final draft of the C++ standard describes push_heap and friends in §25.3 ‘Sorting and related operations’ (the only index entry for those functions). §25.3 doesn't seem to mention a header, whereas ¶2 of the front page of Chapter 25 says that <algorithm> applies to [the functions described in] §§25.1–25.3.
Further corroborating evidence that <algorithm> is the appropriate header for make_heap & friends is that it is described as such in SGI's STL manual, and that /usr/include/c++/4.0.2/algorithm #includes bits/stl_algo.h which #includes bits/stl_heap.h, which defines make_heap & friends.
src/libavoid/makepath.cpp doesn't already #include <algorithm>.
I conclude that it is appropriate to add `#include <algorithm>' to src/libavoid/makepath.cpp, as Jeremy's initial patch did.
pjrm.