Remove <algorithm> dependency from from_json.hpp#4734
Conversation
|
@vittorioromeo Thanks for the PR! Could you please sign off your commit (see https://github.com/nlohmann/json/pull/4734/checks?check_run_id=40403948884). |
|
Rather than rewrite all of these algorithms which have been in production for many years, and potentially break the use on a user-defined type that specializes based on "Possible Implementation" from https://en.cppreference.com/w/cpp/algorithm/transform |
|
This pull request has been marked as stale because it has had no activity for 30 days. While we won’t close it automatically, we encourage you to update or comment if it is still relevant. Keeping pull requests active and up-to-date helps us review and merge changes more efficiently. Thank you for your contributions! |
As discussed on Reddit, here's a PR taking a first small step towards the improvement of compilation times. Avoiding dependencies on "heavy" standard library header such as
<algorithm>can help.Here is the ClangBuildAnalyzer compilation time report:
https://gist.github.com/vittorioromeo/7a89a1e9af8cb89ee217d4e85be83270