use <version> (introduced in C++20) instead of <ciso646> (deprecated)#121
Open
trougnouf wants to merge 1 commit intohank-ai:masterfrom
Open
use <version> (introduced in C++20) instead of <ciso646> (deprecated)#121trougnouf wants to merge 1 commit intohank-ai:masterfrom
trougnouf wants to merge 1 commit intohank-ai:masterfrom
Conversation
…in C++ >= 17) if available
Contributor
|
Thing is, Darknet currently uses C++17. The version header is not available until C++20. |
Author
Wouldn't the preprocessor check take care of it? Somehow this compiles with no complaint (w/ GCC15 and I assume C++17 since I didn't change anything else) whereas leaving ciso646 gives a deprecation warning which turns into a compilation error in programs that treat warnings as such. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Use
<version>(introduced in C++20) instead of<ciso646>(deprecated in C++17).This fixes GCC15 compiler warnings in darknet, e.g.:
In file included from /home/trougnouf/aur/darknet-cpu/src/darknet/src-lib/darknet_internal.hpp:23, from /home/trougnouf/aur/darknet-cpu/src/darknet/src-lib/col2im.cpp:2: /usr/include/c++/15.1.1/ciso646:46:4: warning: #warning "<ciso646> is deprecated in C++17, use <version> to detect implementation-specific macros" [-Wcpp] 46 | # warning "<ciso646> is deprecated in C++17, use <version> to detect implementation-specific macros" | ^~~~~~~and also makes it possible to compile DarkHelp which failed due to -Werror