Investigate better approach to value to string-ish comparison
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
Research direction
Start by reading the value::operator== implementation shown in the issue and the existing overload for string. Investigate how comparisons with string-like values currently construct value objects and identify the relevant comparison tests or entry points. Done means the approach is agreed and documented with coverage for equivalent string comparisons without the unnecessary allocation.
Written by the indexing model from the issue text.
Description
Currently:
friend
bool
operator==(
value const& lhs,
value const& rhs) noexcept
{
return lhs.equal(rhs);
}
Thus, jv == "some string" is equivalent to jv == value("some string"), which allocates.
Consider adding an overload similar to one for string .
- Dominant language
- C++
- Stars
- 478
- Forks
- 110
- Avg merge
- 8d 12h
- Merged PRs (30d)
- 6
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from boostorg/json
-
Difficulty 3/5 1-2 days Newbie friendliness 72/100
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
-
sanitizer warning Open
Difficulty 3/5 1-2 days Newbie friendliness 45/100
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
AXERA-TECH/ax-llm#77 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
games-on-whales/wolf#509 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
bug-unconfirmed
Difficulty 2/5 1-3 hours Newbie friendliness 76/100