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.
pull/739/head
Danke Xie 2016-01-02 01:27:08 -08:00
parent b6673c3fca
commit b2760abeb2
1 changed files with 2 additions and 0 deletions

View File

@ -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.