Commit 44634d57 authored by Yedidya Feldblum's avatar Yedidya Feldblum Committed by Facebook Github Bot

Fix folly/synchronization/Tearable.h under gcc49

Summary: [Folly] Fix `folly/synchronization/Tearable.h` under `gcc49`, which version of `libstdc++` lacks `std::is_trivially_copyable`.

Reviewed By: simpkins

Differential Revision: D6805662

fbshipit-source-id: 5f368cda58b860c7a7ee05addb325a655ab09830
parent 5ae1055c
...@@ -19,6 +19,8 @@ ...@@ -19,6 +19,8 @@
#include <cstring> #include <cstring>
#include <type_traits> #include <type_traits>
#include <folly/Traits.h>
namespace folly { namespace folly {
/** /**
...@@ -48,7 +50,7 @@ class Tearable { ...@@ -48,7 +50,7 @@ class Tearable {
// We memcpy the object representation, and the destructor would not know how // We memcpy the object representation, and the destructor would not know how
// to deal with an object state it doesn't understand. // to deal with an object state it doesn't understand.
static_assert( static_assert(
std::is_trivially_copyable<T>::value, IsTriviallyCopyable<T>::value,
"Tearable types must be trivially copyable."); "Tearable types must be trivially copyable.");
Tearable() { Tearable() {
......
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