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
Fix compile error in Clang #12588
Closed
Closed
Fix compile error in Clang #12588
Conversation
This file contains 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
@ajkr has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
ajkr
approved these changes
Apr 26, 2024
@jaepil has updated the pull request. You must reimport the pull request before landing. |
@ajkr has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
anand1976
pushed a commit
that referenced
this pull request
May 3, 2024
Summary: This PR fixes the following compile errors with Clang: ``` .../rocksdb/env/fs_on_demand.cc:184:5: error: no member named 'for_each' in namespace 'std'; did you mean 'std::ranges::for_each'? 184 | std::for_each(rchildren.begin(), rchildren.end(), [&](std::string& name) { | ^~~~~~~~~~~~~ | std::ranges::for_each /opt/homebrew/opt/llvm@17/bin/../include/c++/v1/__algorithm/ranges_for_each.h:68:23: note: 'std::ranges::for_each' declared here 68 | inline constexpr auto for_each = __for_each::__fn{}; | ^ .../rocksdb/env/fs_on_demand.cc:188:10: error: no member named 'sort' in namespace 'std' 188 | std::sort(result->begin(), result->end()); | ~~~~~^ .../rocksdb/env/fs_on_demand.cc:189:10: error: no member named 'sort' in namespace 'std' 189 | std::sort(rchildren.begin(), rchildren.end()); | ~~~~~^ .../rocksdb/env/fs_on_demand.cc:193:10: error: no member named 'set_union' in namespace 'std' 193 | std::set_union(result->begin(), result->end(), rchildren.begin(), | ~~~~~^ .../rocksdb/env/fs_on_demand.cc:221:5: error: no member named 'for_each' in namespace 'std'; did you mean 'std::ranges::for_each'? 221 | std::for_each( | ^~~~~~~~~~~~~ | std::ranges::for_each /opt/homebrew/opt/llvm@17/bin/../include/c++/v1/__algorithm/ranges_for_each.h:68:23: note: 'std::ranges::for_each' declared here 68 | inline constexpr auto for_each = __for_each::__fn{}; | ^ .../rocksdb/env/fs_on_demand.cc:226:10: error: no member named 'sort' in namespace 'std' 226 | std::sort(result->begin(), result->end(), file_attr_sorter); | ~~~~~^ .../rocksdb/env/fs_on_demand.cc:227:10: error: no member named 'sort' in namespace 'std' 227 | std::sort(rchildren.begin(), rchildren.end(), file_attr_sorter); | ~~~~~^ .../rocksdb/env/fs_on_demand.cc:231:10: error: no member named 'set_union' in namespace 'std' 231 | std::set_union(rchildren.begin(), rchildren.end(), result->begin(), | ~~~~~^ 8 errors generated. ``` Pull Request resolved: #12588 Reviewed By: jaykorean Differential Revision: D56656222 Pulled By: ajkr fbshipit-source-id: 7e94b6250fc9edfe597a61b7622f09d6b6cd9cbd
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.
This PR fixes the following compile errors with Clang: