THRIFT-5698: remove use of deprecated std::iterator#3165
Merged
Jens-G merged 1 commit intoapache:masterfrom Jun 10, 2025
Merged
THRIFT-5698: remove use of deprecated std::iterator#3165Jens-G merged 1 commit intoapache:masterfrom
Jens-G merged 1 commit intoapache:masterfrom
Conversation
Client: cpp C++17 deprecated std::iterator. See https://www.fluentcpp.com/2018/05/08/std-iterator-deprecated/ Prior to this change, compiling while targeting C++17 or higher results in warnings.
CJCombrink
approved these changes
Jun 10, 2025
Member
Author
|
NOTE: The commit content is same as #2778 . |
Contributor
|
@kou Thanks for the work but do you have any idea what goes wrong here: Looks related |
5 tasks
Contributor
|
From some reading (eg. std::iterator is deprecated: Why, What It Was, and What to Use Instead) it seems like all 5 options must be specified when replacing the deprecated This is confirmed in this change: CJCombrink@2dd5c9d |
Member
Author
|
Sorry... You're right. We should have defined |
Contributor
|
@kou No worries, thanks for initiating this fix 👍 |
Contributor
|
I split out the build fix into this PR (thank you @CJCombrink for doing the real work!) #3182 -- I was running into issues. |
mhlakhani
added a commit
that referenced
this pull request
Aug 2, 2025
PR #3165 broke the build with c++11. I split out the compile time fix from https://github.com/apache/thrift/pull/3167/files#diff-d8d7400cdf01511c2ad2df7caf958173c2e96e8633271709c9b0b5cd8e89215c to ensure we have a clean trunk (so I can have other changes on top). I can't take credit for the fixes. I verified this compiles with gcc, clang (on c++11) and also on clang with c++1z
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.
Client: cpp
C++17 deprecated std::iterator.
See
https://www.fluentcpp.com/2018/05/08/std-iterator-deprecated/
Prior to this change, compiling while targeting C++17 or higher results in warnings.
[skip ci]anywhere in the commit message to free up build resources.