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
void M_destroy(T* p) noexcept {
if (usingStdAllocator::value) {
- if (!std::has_trivial_destructor<T>::value) p->~T();
+ if (!boost::has_trivial_destructor<T>::value) p->~T();
} else {
folly::fbv_allocator_traits<Allocator>::destroy(impl_, p);
}
// optimized
static void S_destroy_range(T* first, T* last) noexcept {
- if (!std::has_trivial_destructor<T>::value) {
+ if (!boost::has_trivial_destructor<T>::value) {
// EXPERIMENTAL DATA on fbvector<vector<int>> (where each vector<int> has
// size 0).
// The unrolled version seems to work faster for small to medium sized
} // namespace folly
#endif // FOLLY_FBVECTOR_H
-