-
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
[INFRA] Remove C++17 support #2915
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/seqan/seqan3/ELLPN8SU1nY2Y7rWvTidNNGcsUug |
I think the change is not compatible. The auto syntax does not preserve references / output range, does it? |
I thought you dropped GCC7 and GCC8? I explicitly checked that the syntax works with GCC9! |
I would need to check what
Yes, we dropped GCC7/8, but not yet |
I think I need to write a function object to properly implement this for cpp17.
|
Hm, so you dropped GCC7 and GCC8, but you did not drop C++17 mode? Do you assume that users have code that is incompatible with C++20? And how will they survive an upgrade of their distro since newer compilers require C++20 mode, or not? |
Btw: it is possible to work around this without an extra object but is ugly. See the implementation of views::elements |
I put the issue up for discussion on Monday. |
Core meeting 13.12.2021Pro
Contra
Decision
Follow-up tasks in this PR:
|
978b527
to
b00b4f4
Compare
The behaviour right now is:
Documentation will be follow-up. We still need to change docs to reflect the discontinuation of GCC7/8 support. |
235069a
to
15cd07a
Compare
Codecov Report
@@ Coverage Diff @@
## master #2915 +/- ##
=======================================
Coverage 98.28% 98.28%
=======================================
Files 267 267
Lines 11459 11459
=======================================
Hits 11262 11262
Misses 197 197 Continue to review full report at Codecov.
|
* Add warning in platform.hpp * Add SEQAN3_DISABLE_CPP17_DIAGNOSTIC to disable warning * Only detect CPP20 support
15cd07a
to
e542712
Compare
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.
The future is now!
//!\brief This disables the warning you would get if you compile with `-std=c++17`. | ||
#define SEQAN3_DISABLE_CPP17_DIAGNOSTIC |
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 would maybe write something a little more directed at the user, like "define this variable to disable..."
Side note: We do not really define this variable, but we need to define it so we can document it?
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 just copy-pasted the documentation from the pre-cxx11-abi.
If you want, I can do a doc sweep for these definitions afterwards (new PR) and change all at once.
We only define it for doxygen so that we can document it.
In the actual code, we only check if it is defined, not the value.
# if (__cplusplus < 201703) | ||
# error "SeqAn3 requires C++20, make sure that you have set -std=c++2a (gcc9) or -std=c++20 (gcc10 and higher)." | ||
# elif not defined(SEQAN3_DISABLE_CPP17_DIAGNOSTIC) && (__cplusplus >= 201703) && (__cplusplus < 201709) | ||
# pragma GCC warning "SeqAn 3.1.x is the last version that supports C++17. Newer SeqAn versions, including this one, might not compile with -std=c++17. To disable this warning, use -std=c++2a (gcc9), -std=c++20 (gcc10 and higher), or -DSEQAN3_DISABLE_CPP17_DIAGNOSTIC." |
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.
why is this a pragma
and not an error
?
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.
Same as with pre-cxx-11 ABI.
It might compile, but no guarantees from our side.
It would be totally OK to use cpp17 for now, unless you use the view::char_valid_for
or view::assign_strictly_to
anywhere.
No description provided.