Replace is_trivially_default_constructible with is_trivial for old libstdc++.

This commit is contained in:
Joshua Haberman 2021-02-04 14:33:20 -08:00
parent 7a92a5ab24
commit b74892e9c3

View File

@ -327,7 +327,7 @@ class PROTOBUF_EXPORT PROTOBUF_ALIGNAS(8) Arena final {
template <typename T>
PROTOBUF_NDEBUG_INLINE static T* CreateArray(Arena* arena,
size_t num_elements) {
static_assert(std::is_trivially_default_constructible<T>::value,
static_assert(std::is_trivial<T>::value,
"CreateArray requires a trivially constructible type");
static_assert(std::is_trivially_destructible<T>::value,
"CreateArray requires a trivially destructible type");