• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

nlohmann / json / 42905720176
100%

Build:
DEFAULT BRANCH: develop
Ran 11 Nov 2026 04:43AM UTC
Jobs 1
Files 62
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

10 Nov 2026 09:30PM UTC coverage: 99.702% (-0.001%) from 99.703%
42905720176

push

github

web-flow
Read iterator pairs of std::string and std::vector as pointer ranges (#6029)

* Read iterator pairs of std::string and std::vector as pointer ranges

Before C++20, a pair of iterators of a contiguous container cannot be told
from any other random-access iterator, so json::parse(s.begin(), s.end())
on a std::string or std::vector<char> was read one character at a time,
without the bulk scans of strings, numbers and indentation that the
container itself gets (the container overload of input_adapter() already
maps it to a pointer range). The iterators of std::string and of a
std::vector of 1-byte integral elements are now matched exactly and mapped
to the pointer range they cover; an empty range is not dereferenced. The
character type stays the same, so the results and error positions do not
change.

parse(first, last) of a std::string gets 1.7-2.0x as fast in C++17 on an
Apple M1 Max, accept(first, last) 2.7-3.1x, and from_cbor(first, last) of a
std::vector 8-23% faster.

Signed-off-by: Niels Lohmann <mail@nlohmann.me>

* Fix CI: clang-tidy, unused result, Infer false positive in tests

- unit-deserialization.cpp: raw string literals, and assign the result
  of parse() in CHECK_THROWS_AS (-Wunused-result)
- unit-bson.cpp: mark Infer's NULLPTR_DEREFERENCE on from_bson() with an
  iterator pair as a false positive

Signed-off-by: Niels Lohmann <mail@nlohmann.me>

* Fix implicit char conversion in iterator-pair test

The test built std::vector<unsigned char> and <signed char> from a char
range, which -fsanitize=integer reports as an implicit conversion.

Signed-off-by: Niels Lohmann <mail@nlohmann.me>

* Tests: sweep_allocator::construct() accepts pointers to const

Recent libc++ (emsdk latest) probes construct(const T*, const T&) in an
unevaluated context while checking for trivial copies; the static_cast to
void* in the noexcept specification then fails to compile.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.... (continued)

37051 of 123198 branches covered (30.07%)

5 of 5 new or added lines in 1 file covered. (100.0%)

14 existing lines in 3 files now uncovered.

17089 of 17140 relevant lines covered (99.7%)

4986774.07 hits per line

Coverage Regressions

Lines Coverage ∆ File
9
98.73
-0.01% include/nlohmann/detail/output/serializer.hpp
4
97.74
-0.1% include/nlohmann/detail/input/string_scan.hpp
1
98.36
0.0% include/nlohmann/detail/input/simd_scan.hpp
Jobs
ID Job ID Ran Files Coverage
1 42905720176.1 11 Nov 2026 04:43AM UTC 62
99.7
GitHub Action Run
Source Files on build 42905720176
  • Tree
  • List 62
  • Changed 6
  • Source Changed 6
  • Coverage Changed 6
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #42905720176
  • 8d591bf7 on github
  • Prev Build on develop (#42833872652)
  • Next Build on develop (#42986024726)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc