Add proper C++20 module support (#4799)

This commit is contained in:
Miko
2025-06-29 16:02:31 -04:00
committed by GitHub
parent d70e46bc65
commit b7f741165b
10 changed files with 123 additions and 24 deletions

22
src/modules/json.cppm Normal file
View File

@@ -0,0 +1,22 @@
module;
#include <nlohmann/json.hpp>
export module nlohmann.json;
export namespace nlohmann {
template <typename T = void, typename SFINAE = void>
using adl_serializer = ::nlohmann::adl_serializer<T, SFINAE>;
using basic_json = ::nlohmann::basic_json<>;
using json = ::nlohmann::json;
template <typename RefStringType>
using json_pointer = ::nlohmann::json_pointer<RefStringType>;
using ::nlohmann::ordered_json;
template <class Key, class T, class IgnoredLess, class Allocator>
using ordered_map = ::nlohmann::ordered_map<Key, T, IgnoredLess, Allocator>;
} // namespace nlohmann