Suppress clang deprecation warning in make_compressed_tuple.#1859
Open
TryExceptElse wants to merge 2 commits intoericniebler:masterfrom
Open
Suppress clang deprecation warning in make_compressed_tuple.#1859TryExceptElse wants to merge 2 commits intoericniebler:masterfrom
TryExceptElse wants to merge 2 commits intoericniebler:masterfrom
Conversation
Previously, modern clang versions threw warnings due to the use of `compressed_tuple` within `make_compressed_tuple`. This caused problems when ranges-v3 or a dependant project included the ranges/v3/compressed_tuple.hpp header. This commit suppresses the deprecated-declarations warning within the `make_compressed_tuple` implementation. The deprecation warning fixed by this commit seems to be new behavior, introduced after clang 10, but before (or in) clang-19. It also does not occur when using gcc (tested 7 and 13).
9a08144 to
471784f
Compare
Author
|
I've rebased this on top of c1ed9bf since that commit predated this work and because it compiles cleanly with both gcc and clang (tested using gcc 13 and clang 19). |
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.
Previously, modern clang versions threw warnings due to the use of the deprecated
compressed_tuplewithinmake_compressed_tuple. This caused problems when ranges-v3 or a dependant project included theranges/v3/utility/compressed_pair.hppheader, either directly or indirectly, viaranges/v3/all.hpp. This commit suppresses the deprecated-declarations warning within themake_compressed_tupleimplementation, and adds a deprecation annotation to the former struct, achieving the intended goal of deprecating these structs without disrupting projects that do not usecompressed_tupleormake_compressed_tuple.The deprecation warning fixed by this commit seems to be unique to newer clang versions, not present in clang 10, but introduced before (or in) clang-19. It does not occur when using gcc (tested 7 and 13).