Export json_document and json_view from the C++20 module

The nlohmann.json module includes json_view.hpp in its global module
fragment and exports basic_json_document, basic_json_view, and the four
aliases next to basic_json, json, and ordered_json. features/modules.md
lists them, and tests/module_cpp20 parses a document, so that a missing
export fails the ci_module_cpp20 job.

Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
Niels Lohmann
2026-09-28 21:47:57 +02:00
parent d2a4398d5a
commit f5f8b19364
3 changed files with 19 additions and 1 deletions

View File

@@ -18,6 +18,7 @@ module;
// See: https://github.com/nlohmann/json/issues/5103
#include <nlohmann/json.hpp>
#include <nlohmann/json_view.hpp>
export module nlohmann.json;
@@ -26,9 +27,15 @@ NLOHMANN_JSON_NAMESPACE_BEGIN
using NLOHMANN_JSON_NAMESPACE::adl_serializer;
using NLOHMANN_JSON_NAMESPACE::basic_json;
using NLOHMANN_JSON_NAMESPACE::basic_json_document;
using NLOHMANN_JSON_NAMESPACE::basic_json_view;
using NLOHMANN_JSON_NAMESPACE::json;
using NLOHMANN_JSON_NAMESPACE::json_document;
using NLOHMANN_JSON_NAMESPACE::json_pointer;
using NLOHMANN_JSON_NAMESPACE::json_view;
using NLOHMANN_JSON_NAMESPACE::ordered_json;
using NLOHMANN_JSON_NAMESPACE::ordered_json_document;
using NLOHMANN_JSON_NAMESPACE::ordered_json_view;
using NLOHMANN_JSON_NAMESPACE::ordered_map;
using NLOHMANN_JSON_NAMESPACE::to_string;