From ae83f84548ef3878625c5df9bf50b7f991852430 Mon Sep 17 00:00:00 2001 From: Tim Murray Date: Mon, 7 Apr 2014 14:11:21 -0700 Subject: [PATCH] Add guards to prevent typedefs when C++11 is available. char32_t and char16_t are both defined in C++11. Change-Id: I44fe8f4f05f230c18a1b77fa21b6a40c8f8ecc2d --- include/utils/Unicode.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/utils/Unicode.h b/include/utils/Unicode.h index c8c87c326..5b98de2a1 100644 --- a/include/utils/Unicode.h +++ b/include/utils/Unicode.h @@ -22,8 +22,11 @@ extern "C" { +// Definitions exist in C++11 +#if defined __cplusplus && __cplusplus < 201103L typedef uint32_t char32_t; typedef uint16_t char16_t; +#endif // Standard string functions on char16_t strings. int strcmp16(const char16_t *, const char16_t *);