From d12296af5920f6be93c8b8573f0316bf8a634b82 Mon Sep 17 00:00:00 2001 From: Steve Jones Date: Mon, 28 Sep 2015 11:42:45 -0500 Subject: [PATCH] Don't typedef bool if compiling with C++ If using the C++ wrapper provided by r3.hpp, you get a compiler error when r3_define.h tries to typedef bool as C++ already has native bool type. Modified the guard around this typedef to include a check for C++ compilation (!defined(__cplusplus)). --- include/r3_define.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/r3_define.h b/include/r3_define.h index 6951b4d..5fd30ed 100644 --- a/include/r3_define.h +++ b/include/r3_define.h @@ -9,7 +9,7 @@ #define DEFINE_H #include -#ifndef bool +#if !defined(bool) && !defined(__cplusplus) typedef unsigned char bool; #endif #ifndef FALSE