From b2760abeb29a409055049b9450c5f6bc576032d9 Mon Sep 17 00:00:00 2001 From: Danke Xie Date: Sat, 2 Jan 2016 01:27:08 -0800 Subject: [PATCH] Fix compilation error for Mac OS X and 64-bit architecture For a 64-bit architecture, unsigned long and size_t are the same. This causes a compilation error due to duplicate constructors in document.h. --- contrib/rapidjson/include/rapidjson/document.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/contrib/rapidjson/include/rapidjson/document.h b/contrib/rapidjson/include/rapidjson/document.h index 4c94555b7..7079ef8a2 100644 --- a/contrib/rapidjson/include/rapidjson/document.h +++ b/contrib/rapidjson/include/rapidjson/document.h @@ -557,12 +557,14 @@ public: flags_ |= kIntFlag; } +#if !defined(__x86_64__) //! Constructor for size_t value. explicit GenericValue( size_t u ) RAPIDJSON_NOEXCEPT : data_(), flags_( kNumberUintFlag ) { data_.n.u64 = u; if ( !( u&0x80000000 ) ) flags_ |= kIntFlag|kInt64Flag; } +#endif #endif //! Constructor for double value.