-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEATURE] seqan3::views::chunk #2975
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Codecov Report
@@ Coverage Diff @@
## master #2975 +/- ##
==========================================
+ Coverage 98.17% 98.19% +0.01%
==========================================
Files 272 273 +1
Lines 11991 12119 +128
==========================================
+ Hits 11772 11900 +128
Misses 219 219
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you use https://en.cppreference.com/w/cpp/ranges/view_counted for this?
But it's more or less a take_view without bounds checking, and take_view
didn't work?
//!\cond | ||
requires (!std::same_as<std::remove_cvref_t<rng_t>, chunk_view>) && | ||
std::ranges::viewable_range<rng_t> && | ||
std::constructible_from<urng_t, std::ranges::ref_view<std::remove_reference_t<rng_t>>> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
std::constructible_from<urng_t, std::ranges::ref_view<std::remove_reference_t<rng_t>>> | |
std::constructible_from<urng_t, std::views::all_t<std::remove_reference_t<rng_t>> |
I think?
And you don't really need it for overload resolution anyway?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was copied from the kmer_hash view. I thought I don't need it for overload resolution but for checking wether the ctor is valid with the given rng_t
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, I wonder why we have that kind of ctor. It's non-standard 😆
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really have a need for this ctor? It kinda seems smelly....
{ | ||
private: | ||
//!\brief The iterator type of the underlying range. | ||
using urng_it_t = maybe_const_iterator_t<const_range, urng_t>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
using urng_it_t = maybe_const_iterator_t<const_range, urng_t>; | |
using it_t = maybe_const_iterator_t<const_range, urng_t>; |
It's kinda what I'd expect of it_t
and you call the sentinel sentinel_t
, not urng_sentinel_t
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
still open?
Yes it's what the take_view returns anyway and it did not work because
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but add Enrico's suggestions. :)
Implemetation should work. Doc still has to be done.