From 7c94b13973b22a1e61155429e126280147294bc2 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Tue, 28 May 2013 18:06:16 -0700 Subject: [PATCH] folly: avoid use of has_trivial_destructor in FBVector.h Summary: This is required for gcc-4.8.x. Use boost::has_trivial_destructor, not std::has_trivial_destructor. The latter was never standard, and the now-std name (and the only one supported in gcc-4.8.0) is std::is_trivially_destructible. Test Plan: fbmake runtests and then run_unit_tests.sh with -r and again with -d Reviewed By: njormrod@fb.com FB internal diff: D923359 @override-unit-failures --- folly/FBVector.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/folly/FBVector.h b/folly/FBVector.h index 9e593c60..7a0cc0f5 100644 --- a/folly/FBVector.h +++ b/folly/FBVector.h @@ -428,7 +428,7 @@ private: void M_destroy(T* p) noexcept { if (usingStdAllocator::value) { - if (!std::has_trivial_destructor::value) p->~T(); + if (!boost::has_trivial_destructor::value) p->~T(); } else { folly::fbv_allocator_traits::destroy(impl_, p); } @@ -466,7 +466,7 @@ private: // optimized static void S_destroy_range(T* first, T* last) noexcept { - if (!std::has_trivial_destructor::value) { + if (!boost::has_trivial_destructor::value) { // EXPERIMENTAL DATA on fbvector> (where each vector has // size 0). // The unrolled version seems to work faster for small to medium sized @@ -1761,4 +1761,3 @@ void attach(fbvector& v, T* data, size_t sz, size_t cap) { } // namespace folly #endif // FOLLY_FBVECTOR_H - -- 2.34.1