Skip to content

feat: Add C++ modules support - #1729

Open
mikomikotaishi wants to merge 3 commits into
open-source-parsers:masterfrom
mikomikotaishi:master
Open

mikomikotaishi wants to merge 3 commits into
open-source-parsers:masterfrom
mikomikotaishi:master

Conversation

@mikomikotaishi

Copy link
Copy Markdown

This PR adds support for C++20 modules, which can be enabled if the version of C++ is at least C++20 (and is opt-in, therefore not raising the minimum C++ version). It is enabled using JSONCPP_WITH_MODULE and creates a module jsoncpp.

@greptile-apps

greptile-apps Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The changes appear safe to merge; both numbered previous findings are addressed.

Summary

Adds an opt-in C++20 module named jsoncpp, exposed through jsoncpp::module.

  • C++20 projects can import JsonCpp through an opt-in module.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
    Config["find_package(jsoncpp)"] --> Exports["Load jsoncpp-targets.cmake"]
    Exports --> Module["jsoncpp_module"]
    Module --> Alias["jsoncpp::module"]
    Module --> Library["Selected JsonCpp library"]
Loading

Reviews (4) · Last reviewed commit: "Address Greptile suggestions for module ..." · Reviewed by Greptile

Comment thread src/modules/CMakeLists.txt
Comment thread src/modules/CMakeLists.txt Outdated
Comment thread src/modules/jsoncpp.cppm
Comment thread src/modules/jsoncpp.cppm
Comment thread src/modules/CMakeLists.txt Outdated
@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 40347579800

Coverage remained the same at 89.926%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 2740
Covered Lines: 2615
Line Coverage: 95.44%
Relevant Branches: 2640
Covered Branches: 2223
Branch Coverage: 84.2%
Branches in Coverage %: Yes
Coverage Strength: 23835.16 hits per line

💛 - Coveralls

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants