Re: [Inkscape-devel] Port to SGI IRIX 6.5
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.
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.
Thanks for the clarification, Peter. Now I remember the real reason why I have <algorithm> there: when I met the undefined *_heap() error messages, I did consulted the SGI's STL manual.
Note: even when <algorithm> is included, the std:: prefixes are still needed for *_heap() functions for me.
Anyone has any ideas about why the Inkscape binary bus-errored on an SGI Octane2 when DISPLAY is ':0.0' but the exact same binary is running fine (except some menu entries) when DISPLAY is set to 'remote-winbox-ip:0.0' (Cygwin/X)?
Thank you.
--Jeremy
On Sat, Nov 12, 2005 at 09:25:47AM +1100, Peter Moulder wrote:
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:
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.
participants (2)
-
Jeremy Y. Meng
-
Peter Moulder