From 3167616f77623eaca2d7b5dc12e7603077c52554 Mon Sep 17 00:00:00 2001 From: Johan Mabille Date: Wed, 5 Jun 2024 09:48:23 +0200 Subject: [PATCH] test ugly fix --- src/utils/xjson.hpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/utils/xjson.hpp b/src/utils/xjson.hpp index eac7ba8..849daa2 100644 --- a/src/utils/xjson.hpp +++ b/src/utils/xjson.hpp @@ -40,4 +40,19 @@ namespace nlohmann }; } +#ifdef _WIN32 +namespace std +{ + template + void to_json(nlohmann::json& j, const std::variant& data) + { + std::visit + ( + [&j] (const auto & arg) { j = arg; }, + data + ); + } +} +#endif + #endif