Skip to content

Add missing <memory> include in EvictingCacheMap.h#2657

Closed
UditDewan wants to merge 1 commit into
facebook:mainfrom
UditDewan:fix-evictingcachemap-memory-include
Closed

Add missing <memory> include in EvictingCacheMap.h#2657
UditDewan wants to merge 1 commit into
facebook:mainfrom
UditDewan:fix-evictingcachemap-memory-include

Conversation

@UditDewan

Copy link
Copy Markdown
Contributor

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 #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

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>
@meta-cla meta-cla Bot added the CLA Signed label Jun 11, 2026
@meta-codesync

meta-codesync Bot commented Jun 26, 2026

Copy link
Copy Markdown

@8Keep has imported this pull request. If you are a Meta employee, you can view this in D109789893.

@meta-codesync meta-codesync Bot closed this in 6a219ee Jun 26, 2026
@meta-codesync meta-codesync Bot added the Merged label Jun 26, 2026
@meta-codesync

meta-codesync Bot commented Jun 26, 2026

Copy link
Copy Markdown

@8Keep merged this pull request in 6a219ee.

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

EvictingCacheMap seems to miss <memory> header for std::unique_ptr

1 participant