Skip to content

Commit 4a29ff0

Browse files
committed
Fix UninitializedMemoryHacks.h for updated libc++ (std::__compressed_pair removed)
Update std_vector_layout, as __compressed_pair was removed in libc++ in llvm/llvm-project#76756 fixes facebook#2351
1 parent b483188 commit 4a29ff0

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)