# This is a combination of 5 commits.

# This is the 1st commit message:

 add test for #4440

Signed-off-by: Niels Lohmann <mail@nlohmann.me>

# Conflicts:
#	tests/src/unit-regression2.cpp

# This is the commit message #2:

 add test for #4440

# This is the commit message #3:

 add test for #4440

# This is the commit message #4:

 add test for #4440

# This is the commit message #5:

 add test for #4440

Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
Niels Lohmann
2025-05-22 12:31:41 +02:00
parent 6cbf2b205a
commit c4c1820c47

View File

@@ -1104,13 +1104,13 @@ TEST_CASE("regression tests 2")
#if JSON_HAS_RANGES == 1
SECTION("issue 4440")
{
auto noOpFilter = std::views::filter([](auto&&)
auto noOpFilter = std::views::filter([](auto&&) noexcept
{
return true;
});
json j = {1, 2, 3};
auto filtered = j | noOpFilter;
CHECK(j == *filtered.begin());
CHECK(*filtered.begin() == 1);
}
#endif
}