Skip to content

Conversation

@aryanrahar
Copy link

Description
This pull request resolves issue #4825 by removing the unnecessary template keyword from get() calls in non-dependent contexts throughout the README and MkDocs documentation.

What
Replaced .template get<...>() with .get<...>() in documentation examples where it was not required.
No library code was changed.

Why
Improves the clarity and correctness of the code examples for users.
The .template keyword is only necessary for dependent names in C++ templates and can be confusing when used outside of that context.

How Tested
Successfully built and previewed the documentation locally using mkdocs.
Ran the full CTest suite as a courtesy check to ensure no regressions were introduced.

@aryanrahar
Copy link
Author

Can you take a look at the PR will turn the DCO green once all checks are passed!

@nlohmann
Copy link
Owner

Please rebase to the latest develop branch so the CI can run successfully. Also please check https://github.com/nlohmann/json/pull/4920/checks?check_run_id=50274941755

@nlohmann
Copy link
Owner

Hi @aryanrahar, can you please rebase?

@aryanrahar
Copy link
Author

aryanrahar commented Sep 20, 2025 via email

@nlohmann
Copy link
Owner

Actually my midsem exams are going i will do the work in 1-2 days!

No worries - good luck to you! 🍀

@aryanrahar aryanrahar force-pushed the docs/fix-4825-remove-template-get branch 2 times, most recently from b626754 to 3ab4582 Compare October 1, 2025 09:48
@aryanrahar
Copy link
Author

Can you approve the change?

@aryanrahar
Copy link
Author

is there any issue?

@coveralls
Copy link

coveralls commented Oct 22, 2025

Coverage Status

coverage: 99.191%. remained the same
when pulling 41a0fee on aryanrahar:docs/fix-4825-remove-template-get
into 54be9b0 on nlohmann:develop.

@nlohmann
Copy link
Owner

Can you please rebase to the latest develop branch to have a green CI?

@aryanrahar aryanrahar force-pushed the docs/fix-4825-remove-template-get branch from 3ab4582 to 41a0fee Compare October 23, 2025 12:43
@aryanrahar
Copy link
Author

Done

Can you please rebase to the latest develop branch to have a green CI?

done

@nlohmann nlohmann removed the please rebase Please rebase your branch to origin/develop label Oct 23, 2025
@nlohmann
Copy link
Owner

I just merged #4846 which worked on the same issue. Please rebase your branch to see whether there is anything left to do.

@nlohmann nlohmann added the please rebase Please rebase your branch to origin/develop label Oct 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation L please rebase Please rebase your branch to origin/develop

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Template instantiation of nlohmann::basic_json<> fails on C++17 README.md and documentation overuse template keyword before get function

3 participants