open-source-parsers / open-source-parsers/jsoncpp

May it better that using ArrayIndex= size_t rather than ArrayIndex=unsigned int?

Open
#1,496 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug enhancement
Dominant language
C++
Stars
8.9k
Forks
2.7k
Avg merge
31m
Merged PRs (30d)
1

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the ArrayIndex definition and reproducing the reported overloaded-operator error in 32-bit and 64-bit builds. Review the affected usages and platform-compatibility expectations; done means a maintainer-approved decision with validation on the supported build targets.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.