Open biepenghaomie opened 1 year ago
I agree with this issue; unsigned int
seems like an inappropriate type to use for array indices, since it is only required to be 16 bits wide, which need not be enough for indexing JSON arrays. std::size_t
is a more fitting type since the address width serves as a natural upper bound on the width of array indices.
When I use size_t in 32bit version,it can work for get index of object.But when i transform my code compile to 64bit,it will error with match more than one opeartor. Finally,I find jsoncpp using ArrayIndex=unsigned int.It equal size_t which is usigned int in 32bit too.But size_t is usigned long long in 64bit. So,may it better that using ArrayIndex= size_t rather than ArrayIndex=unsigned int?Let cpp compiler tool chain decide to use unsigned int or usigned long long.