Skip to content

Commit ef5160f

Browse files
pps83facebook-github-bot
authored andcommitted
Fix UninitializedMemoryHacks.h for updated libc++ (std::__compressed_pair removed) (#2403)
Summary: Update std_vector_layout, as __compressed_pair was removed in libc++ in llvm/llvm-project#76756 Fixes: #2351 Pull Request resolved: #2403 Reviewed By: Gownta Differential Revision: D72390157 Pulled By: yfeldblum fbshipit-source-id: ae25ff840d7ad6e8ea352895f59c2eea581a9fcf
1 parent 1996e12 commit ef5160f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

folly/memory/UninitializedMemoryHacks.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,11 @@ struct std_vector_layout {
309309

310310
pointer __begin_;
311311
pointer __end_;
312+
#ifdef _LIBCPP_COMPRESSED_PAIR
313+
_LIBCPP_COMPRESSED_PAIR(pointer, __cap_ = nullptr, allocator_type, __alloc_);
314+
#else
312315
std::__compressed_pair<pointer, allocator_type> __end_cap_;
316+
#endif
313317
};
314318

315319
template <typename T>

0 commit comments

Comments
 (0)