Fix build error under non-Clang compilers
This commit is contained in:
parent
d5d7171f6d
commit
07e1d7870a
@ -29,7 +29,7 @@
|
||||
RAPIDJSON_NAMESPACE_BEGIN
|
||||
namespace internal {
|
||||
|
||||
#if defined(__has_builtin) && __has_builtin(__builtin_clzll)
|
||||
#if (defined(__GNUC__) && __GNUC__ >= 4) || RAPIDJSON_HAS_BUILTIN(__builtin_clzll)
|
||||
#define RAPIDJSON_CLZLL __builtin_clzll
|
||||
#else
|
||||
|
||||
|
@ -490,6 +490,12 @@ RAPIDJSON_NAMESPACE_END
|
||||
#define RAPIDJSON_VERSION_CODE(x,y,z) \
|
||||
(((x)*100000) + ((y)*100) + (z))
|
||||
|
||||
#if defined(__has_builtin)
|
||||
#define RAPIDJSON_HAS_BUILTIN(x) __has_builtin(x)
|
||||
#else
|
||||
#define RAPIDJSON_HAS_BUILTIN(x) 0
|
||||
#endif
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// RAPIDJSON_DIAG_PUSH/POP, RAPIDJSON_DIAG_OFF
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user