-
Notifications
You must be signed in to change notification settings - Fork 88
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
Avoid using Template argument deduction for Vector #2276
Conversation
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.
(Approved, since you are explicitly stating the template type, but there may be more than one such instance of code.. I wonder, and this isn't upto the expected c++ 17, so definitely not optimal.)
However, please check of that version of compiler (gcc 7.x) has an upgrade for SLES.
And also if some specific compiler option could be turned on..
I've enabled
SLES docker had gcc 7.5. I am not sure when it is due for an upgrade in QA or DevOps' docker. But I agree that it should be upgraded, it is old. |
I think gcc 7.x supports CTAD. This warning might be worth ignoring, as an alternative. |
Codecov Report
@@ Coverage Diff @@
## develop #2276 +/- ##
========================================
Coverage 91.50% 91.50%
========================================
Files 430 430
Lines 16133 16134 +1
========================================
+ Hits 14762 14763 +1
Misses 1371 1371
|
We need to support the C++ runtime that applications are using which will be the C++ runtime used by the distro, in the case for sles its gcc 7. If we do upgrade the version it needs to use the one provided by the distro that is binary compatible with gcc 7 runtime. I do know rhel provides newer gcc versions, but I dont know about sles. |
It does, but the C++ runtime doesn't provide the deduction guidelines.
We shouldn't ignore this warning, This is useful in diagnosing hard to figure out bugs due to a simple typo: template<class It>
bool is_palindrome(It first, It last) {
return std::equal(
first, last,
// Typo, should be std::make_reverse_iterator
std::reverse_iterator(last),
std::reverse_iterator(first)
);
} In general for container and container-like types(like |
CTAD may not be supported by older C++ runtimes e.g. (gcc-7).
Seeing this error with
-Werror
on SLES builds :