From d7f720ad21eaf01e5413b6eb0ce0b121f2871ca7 Mon Sep 17 00:00:00 2001 From: Richard Aas Date: Thu, 15 May 2014 08:17:32 +0000 Subject: [PATCH] re_types: don't define min/max when using C++ --- include/re_types.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/re_types.h b/include/re_types.h index f43cd4e..310a869 100644 --- a/include/re_types.h +++ b/include/re_types.h @@ -122,6 +122,8 @@ typedef bool _Bool; #undef MAX #define MAX(a,b) (((a)>(b)) ? (a) : (b)) +#ifndef __cplusplus + /** Get the minimal value */ #undef min #define min(x,y) MIN(x, y) @@ -130,6 +132,8 @@ typedef bool _Bool; #undef max #define max(x,y) MAX(x, y) +#endif + /** Defines a soft breakpoint */ #if (defined(__i386__) || defined(__x86_64__)) && !defined(__SYMBIAN32__) #define BREAKPOINT __asm__("int $0x03")