Commit f7798632 authored by Nathan Bronson's avatar Nathan Bronson Committed by Facebook Github Bot

UninitializedMemoryHacks gcc 9 support

Summary:
gcc 9's libstdc++ moves the definition of _M_impl._M_finish
into a new intermediate class. It's still addressible with the same name,
but the type of the member pointer changes. This diff switches to using
decltype to tolerate both the old and the new implementation.

Reported as issue https://github.com/facebook/folly/issues/1223

Reviewed By: yfeldblum

Differential Revision: D17283175

fbshipit-source-id: 9c9da28b83c3cb3584d33575b462d10b17002edb
parent bbd6fb43
......@@ -327,10 +327,9 @@ struct MakeUnsafeVectorSetLargerSize : std::vector<T> {
template struct folly::detail::MakeUnsafeVectorSetLargerSize< \
FollyMemoryDetailTranslationUnitTag, \
TYPE, \
std::vector<TYPE>::_Vector_impl( \
std::_Vector_base<TYPE, std::allocator<TYPE>>::*), \
decltype(&std::vector<TYPE>::_M_impl), \
&std::vector<TYPE>::_M_impl, \
TYPE*(std::vector<TYPE>::_Vector_impl::*), \
decltype(&std::vector<TYPE>::_Vector_impl::_M_finish), \
&std::vector<TYPE>::_Vector_impl::_M_finish>; \
FOLLY_DECLARE_VECTOR_RESIZE_WITHOUT_INIT_IMPL(TYPE)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment