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
save infix of const String to infix variable #1009
Comments
Should be:
If you have C++11 you can do:
|
That indeed works... A question to this auto feature: |
Hmm hard to say in general. In this case I would prefer auto. Seems to me that auto is always convenient whenever a return type is generic, as you spare computing it through a metafunction. |
We don't have a policy on this in SeqAn, yet. I recommend to never use auto, unless
So in your example it would be ok, because it is clear that the |
Hmm what's your definition of obvious? Wouldn't you do:
This also returns an infix but it's not so obvious (infix of the const text on which the iterator's index is based on). Indeed that's why @kaktus42 got a problem. |
There is a trade-off between verbosity and readability, and there are benefits to both, it's definitely something we should discuss. It also depends on the documentation of said function... For function return values this will also be relevant. And since cxx14, there is also |
on dev branch.
throws compiling error:
with
Shouldn't this work properly?
The text was updated successfully, but these errors were encountered: