Conditionally Borrowed Ranges#1877
Conversation
miscco
left a comment
There was a problem hiding this comment.
Looks good to me!
Did you verify that we actually test against a borrowed range?
I don't have a deep understanding of the ranges test stuff, but implementing this forced me to fix the common view test, so it seems we do. |
As long as we use a span, we should be fine |
We need to add borrowed range support via a span to take_view and drop_view the other already test it Something along those lines should do it // Validate a non-view borrowed range
{
constexpr span s{some_ints};
STATIC_ASSERT(test_one(s, expected_output));
test_one(s, expected_output);
}
{ // Validate a view borrowed range
constexpr auto v =
views::iota(0ull, ranges::size(some_ints)) | std::views::transform([](auto i) { return some_ints[i]; });
STATIC_ASSERT(test_one(v));
test_one(v);
} |
.... and add coverage of member `data`.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Thanks for implementing this LWG issue resolution! 🚀 😻 🎉 |
Fixes #1682.