From: Christian Bauer Date: Sat, 7 Jun 2003 00:47:49 +0000 (+0000) Subject: synced to 1.2 X-Git-Tag: release_1-1-1~7 X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?a=commitdiff_plain;h=2220b612d204b26ba61f4813e622448650f0ab1e;p=ginac.git synced to 1.2 --- diff --git a/ginac/utils.h b/ginac/utils.h index f21dfed4..c81c8888 100644 --- a/ginac/utils.h +++ b/ginac/utils.h @@ -28,6 +28,8 @@ #include #include +#include + #include "assertion.h" namespace GiNaC { @@ -56,11 +58,14 @@ unsigned log2(unsigned n); /** Compare two pointers (just to establish some sort of canonical order). * @return -1, 0, or 1 */ -inline int compare_pointers(const void * a, const void * b) +template +inline int compare_pointers(const T * a, const T * b) { - if (a()(a, b)) return -1; - else if (a>b) + else if (std::less()(b, a)) return 1; return 0; }