Commit da0afba8 authored by Feng Xiao's avatar Feng Xiao

Remove std::is_trivially_default_constructible.

This type_traits is only added after g++ 5.1.0 but we need to support g++ 4+.
parent 3a5455b3
......@@ -413,12 +413,6 @@ class LIBPROTOBUF_EXPORT Arena {
// trivially destructible.
template <typename T> GOOGLE_ATTRIBUTE_ALWAYS_INLINE
static T* CreateArray(::google::protobuf::Arena* arena, size_t num_elements) {
#if __cplusplus >= 201103L
static_assert(std::is_trivially_default_constructible<T>::value,
"CreateArray requires a trivially constructible type");
static_assert(std::is_trivially_destructible<T>::value,
"CreateArray requires a trivially destructible type");
#endif
if (arena == NULL) {
return static_cast<T*>(::operator new[](num_elements * sizeof(T)));
} else {
......
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