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::sam_record #2389
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/seqan/seqan3/H2c7c6cNSGeR9Nv7A1SCR8D5UVFs |
278edf7
to
4cf1347
Compare
Codecov Report
@@ Coverage Diff @@
## master #2389 +/- ##
=======================================
Coverage 98.20% 98.21%
=======================================
Files 266 267 +1
Lines 10831 10864 +33
=======================================
+ Hits 10637 10670 +33
Misses 194 194
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.
Thanks a lot for the effort!
Just a small correction and a question
//!\} | ||
|
||
//!\brief The identifier, usually a string. | ||
decltype(auto) id() && |
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 please explain why there are 4 different assignments for each field? The slight differences in syntax are not clear to me
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.
Yes, we want to mimic the way std::get
behaves, and it will return
id_type &&
forstd::get<id>(sam_record &&)
id_type &
forstd::get<id>(sam_record &)
id_type const &&
forstd::get<id>(sam_record const &&)
id_type const &
forstd::get<id>(sam_record const &)
We unfortunately need 4 overloads for this depending on whether the input has the type modifier &&
, &
, const &&
, const &
. The return type, here decltype(auto)
, has the corresponding type modifier hidden within it.
This is a special case, and this is not the norm, so you should not write 4 accessors functions if you write code yourself. In most cases it is fine just to copy the data without having a ref/const-qualified function.
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.
Thanks for the explanation!
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.
Just documentation stuff, I'm not sure about all the phrasings either
@eseiler I added a couple of suggestions, can you go over them and edit and then apply them? You are completely right that |
I thought you can construct the |
You are right, I can add this if you want. I thought of this Pr as a reintroduction of existing, working functionality, but this would be more like a new "feature". I'd want to do it in a second PR, because I need to add new test cases for it. |
Ah, so it works for the Do you want to rebase? |
082a401
to
aa7df47
Compare
aa7df47
to
724eda0
Compare
I added a backlog issue seqan/product_backlog#292 |
724eda0
to
d59e290
Compare
Part of seqan/product_backlog#289
This implements