miloyip/rapidjson — pull request #100 by pah (2014-08-11 14:20:39+00:00)
Title: Fix sign-comparison warning/error on 32-bit platforms

On 32-bit platforms, Clang errors out with a sign-comparison error for the `MemberIterator` difference checks:
````
In file included from ../../test/unittest/valuetest.cpp:1:
In file included from ../../test/unittest/unittest.h:23:
../../thirdparty/gtest/include/gtest/gtest.h:1316:16: error: comparison of integers of different signs:
'const unsigned int' and 'const int' [-Werror,-Wsign-compare]
if (expected == actual) {
~~~~~~~~ ^ ~~~~~~
../../thirdparty/gtest/include/gtest/gtest.h:1352:12: note: in instantiation of function template
specialization 'testing::internal::CmpHelperEQ' requested here
return CmpHelperEQ(expected_expression, actual_expression, expected,
^
../../test/unittest/valuetest.cpp:821:2: note: in instantiation of function template specialization
'testing::internal::EqHelper::Compare' requested here
EXPECT_EQ(9u, x.MemberEnd() - x.MemberBegin());
````
On 64-bit platforms, this is hidden by the C++ integer promotion rules (`unsigned` -> `ptrdiff_t`).

As side note: Do we want to add an `ObjectSize()` function to query the number of members of an object?