From f348fc7b4c95115ca36c4a467c1cca7c7db56bd3 Mon Sep 17 00:00:00 2001 From: bjarni Date: Thu, 11 Jan 2007 13:47:55 +0000 Subject: [PATCH] (svn r8061) -Fix r8055: obj-c can't handle templates We will need to figure out a nicer solution for this, but now OSX compiles again --- src/macros.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/macros.h b/src/macros.h index 9c73f38f31..a66220154e 100644 --- a/src/macros.h +++ b/src/macros.h @@ -20,11 +20,14 @@ #undef max #endif +/* Objective C don't like templates */ +#ifdef __cplusplus template static inline T max(T a, T b) { return a >= b ? a : b; } +#endif static inline int min(int a, int b) { if (a <= b) return a; return b; }