aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf/generated_message_table_driven_lite.h
diff options
context:
space:
mode:
authorGravatar Adam Cozzette <acozzette@google.com>2018-03-14 13:12:11 -0700
committerGravatar Adam Cozzette <acozzette@google.com>2018-03-20 13:02:04 -0700
commit616fe05fc3451590568ff8b33d55662c0d27c5b0 (patch)
tree2f2161983bfa597cc0957836ccf2cf4041615a48 /src/google/protobuf/generated_message_table_driven_lite.h
parent837c94b86f10c53c5b7b864944ad86a362234009 (diff)
Removed use of some type traits
Pre-5.1.0 versions of GCC do not support these particular type traits (see https://github.com/google/protobuf/issues/417).
Diffstat (limited to 'src/google/protobuf/generated_message_table_driven_lite.h')
-rw-r--r--src/google/protobuf/generated_message_table_driven_lite.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/google/protobuf/generated_message_table_driven_lite.h b/src/google/protobuf/generated_message_table_driven_lite.h
index b2c60968..0d90fe33 100644
--- a/src/google/protobuf/generated_message_table_driven_lite.h
+++ b/src/google/protobuf/generated_message_table_driven_lite.h
@@ -100,7 +100,7 @@ inline ExtensionSet* GetExtensionSet(MessageLite* msg, int64 extension_offset) {
template <typename Type>
inline Type* AddField(MessageLite* msg, int64 offset) {
- static_assert(std::is_trivially_copy_assignable<Type>::value ||
+ static_assert(std::is_pod<Type>::value ||
std::is_same<Type, InlinedStringField>::value,
"Do not assign");
@@ -119,7 +119,7 @@ inline string* AddField<string>(MessageLite* msg, int64 offset) {
template <typename Type>
inline void AddField(MessageLite* msg, int64 offset, Type value) {
- static_assert(std::is_trivially_copy_assignable<Type>::value,
+ static_assert(std::is_pod<Type>::value,
"Do not assign");
*AddField<Type>(msg, offset) = value;
}
@@ -141,7 +141,7 @@ inline Type* MutableField(MessageLite* msg, uint32* has_bits,
template <typename Type>
inline void SetField(MessageLite* msg, uint32* has_bits, uint32 has_bit_index,
int64 offset, Type value) {
- static_assert(std::is_trivially_copy_assignable<Type>::value,
+ static_assert(std::is_pod<Type>::value,
"Do not assign");
*MutableField<Type>(msg, has_bits, has_bit_index, offset) = value;
}