⚗️ try to fix compilation issue

This commit is contained in:
Niels Lohmann 2023-03-19 14:41:06 +01:00
parent 32f3a7a6ff
commit 0323b7dc7c
No known key found for this signature in database
GPG Key ID: 7F3CEA63AE251B69

View File

@ -272,22 +272,9 @@ TEST_CASE("constructors")
CHECK(j[3][1] == 1);
}
/* does not work with Clang and C++20
SECTION("std::tuple with discarded values")
{
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};
json j{1, 2.0, "string", 42};
const auto t = j.get<std::tuple<int, float, std::string>>();
CHECK(std::get<0>(t) == j[0]);