-
Notifications
You must be signed in to change notification settings - Fork 282
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
C++11 compatibility for headers #2257
Conversation
those C++14 changes are quite verbose... |
Codecov Report
@@ Coverage Diff @@
## main #2257 +/- ##
=======================================
Coverage 63.46% 63.46%
=======================================
Files 118 118
Lines 19598 19599 +1
Branches 9556 9556
=======================================
+ Hits 12438 12439 +1
Misses 5094 5094
Partials 2066 2066
Continue to review full report at Codecov.
|
This pull request fixes 1 alert when merging 52d7ea6 into 8a9f6ac - view on LGTM.com fixed alerts:
|
That alert is not fixed as much as it is hidden honestly. |
@piponazo I tested with
and no more C++17 warnings.
is interesting though. It gets introduced in C++17, that's true. But the C++ standard says that unknown attributes should not be an error. No idea if this should be handled. |
This pull request fixes 1 alert when merging 6312e04 into 8a9f6ac - view on LGTM.com fixed alerts:
|
This should allow usage with C++11 projects. It's also wrong. The only user of this assigns an std::string from a string_view, which is not safe. Signed-off-by: Rosen Penev <[email protected]>
Remove is_signed_v and CTAD for std::array as they are in C++17 Remove remove_cv_t, remove_pointer_t, and make_unsigned_t as they are in C++14 Signed-off-by: Rosen Penev <[email protected]>
This pull request fixes 1 alert when merging c304808 into 75c53ea - view on LGTM.com fixed alerts:
|
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 changes look good to me. The only things missing is the automatic method to test. It would be nice to have a mechanism to detect automatically when somebody place new code in the headers which is not C++11 compliant. But we can take care of that in a different PR.
I'll put this as a draft.
I tested compilation with darktable and it seems that compilation worked.
OTOH, when I look at some of the other stuff in the headers like std::remove_cv_t, that gets introduced in C++14. I need a way to test C++11 compilation of all the headers.