⚗️ try to fix compilation issue

This commit is contained in:
Niels Lohmann 2023-03-18 15:21:07 +01:00
parent 86c28f4e44
commit bc46595053
No known key found for this signature in database
GPG Key ID: 7F3CEA63AE251B69

View File

@ -276,6 +276,17 @@ TEST_CASE("constructors")
{
json const j{1, 2.0, "string", 42};
const auto t = j.get<std::tuple<int, float, std::string>>();
CHECK(std::get<0>(t) == j[0]);
CHECK(std::get<1>(t) == j[1]);
const bool res = (std::get<2>(t) == j[2]);
CHECK(res);
}
SECTION("std::tuple with discarded values")
{
json const j{1, 2.0, std::string{"string"}, 42};
const auto t = j.get<std::tuple<int, float, std::string>>();
CHECK(std::get<0>(t) == j[0]);
CHECK(std::get<1>(t) == j[1]);