Add missing <memory> include in EvictingCacheMap.h#2657
Closed
UditDewan wants to merge 1 commit into
Closed
Conversation
EvictingCacheMap.h uses std::unique_ptr and std::make_unique but does not include <memory>, relying on transitive includes. This breaks compilation with toolchains/stdlib versions where no other included header pulls in <memory>. Fixes facebook#2598 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
@8Keep has imported this pull request. If you are a Meta employee, you can view this in D109789893. |
meta-codesync Bot
pushed a commit
to facebook/hhvm
that referenced
this pull request
Jun 26, 2026
Summary: `folly/container/EvictingCacheMap.h` uses `std::unique_ptr` and `std::make_unique` (in `insertImpl`, `extractNode`, and related code) but does not include `<memory>`, relying on it being pulled in transitively by other headers. With toolchains/stdlib combinations where no included header transitively provides `<memory>`, compilation fails. This adds the missing `#include <memory>`. Fixes facebook/folly#2598 X-link: facebook/folly#2657 Reviewed By: ilvokhin Differential Revision: D109789893 Pulled By: 8Keep fbshipit-source-id: b9127948a60f16a67e03f930c324f3869422a365
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.
Summary
folly/container/EvictingCacheMap.husesstd::unique_ptrandstd::make_unique(ininsertImpl,extractNode, and related code) but does not include<memory>, relying on it being pulled in transitively by other headers. With toolchains/stdlib combinations where no included header transitively provides<memory>, compilation fails.This adds the missing
#include <memory>.Fixes #2598
Test plan
Header-only, one-line standard-library include addition; no behavior change. The header now self-declares everything it uses from
<memory>.🤖 Generated with Claude Code