Skip to content

Commit

Permalink
test ugly fix
Browse files Browse the repository at this point in the history
  • Loading branch information
JohanMabille committed Jun 5, 2024
1 parent 8611fde commit 3167616
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/utils/xjson.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,19 @@ namespace nlohmann
};
}

#ifdef _WIN32
namespace std
{
template <class... Ts>
void to_json(nlohmann::json& j, const std::variant<Ts...>& data)
{
std::visit
(
[&j] (const auto & arg) { j = arg; },
data
);
}
}
#endif

#endif

0 comments on commit 3167616

Please sign in to comment.