Mark json_fwd.hpp as exported by json.hpp for IWYU / include-cleaner

json_fwd.hpp is the only header declaring the nlohmann::json alias, so
include-what-you-use and clang-tidy's misc-include-cleaner attributed
the name to it and told users of <nlohmann/json.hpp> to include
json_fwd.hpp as well (or instead, which breaks compilation).

Fixes #5812

Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
Niels Lohmann committed 2026-10-13 10:11:13 +02:00
1 parent 40a62947d3
commit 82cb244b90
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -27776,7 +27776,7 @@ NLOHMANN_JSON_NAMESPACE_END
// #include <nlohmann/detail/value_t.hpp>
// #include <nlohmann/json_fwd.hpp>
// IWYU pragma: export
// #include <nlohmann/ordered_map.hpp>
// __ _____ _____ _____
// __| | __| | | | JSON for Modern C++