mirror of
https://github.com/nlohmann/json.git
synced 2025-11-23 19:34:10 +08:00
# 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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user