Browse Source

Updating CHANGES.txt and removing all instances of std::is_pod

Deanna Garcia 4 years ago
parent
commit
62fb6ddfce

+ 26 - 0
CHANGES.txt

@@ -12,6 +12,22 @@ Unreleased Changes (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
     implementation detail users must not rely on. It should not be used in
     implementation detail users must not rely on. It should not be used in
     unit tests.
     unit tests.
   * Change the signature of Any::PackFrom() to return false on error.
   * Change the signature of Any::PackFrom() to return false on error.
+  * Add fast reflection getter API for strings.
+  * Constant initialize the global message instances
+  * Avoid potential for missed wakeup in UnknownFieldSet
+  * Now Proto3 Oneof fields have "has" methods for checking their presence in
+    C++.
+  * Bugfix for NVCC
+  * Return early in _InternalSerialize for empty maps.
+  * Adding functionality for outputting map key values in proto path logging
+    output (does not affect comparison logic) and stop printing 'value' in the
+    path. The modified print functionality is in the
+    MessageDifferencer::StreamReporter.
+  * Fixes https://github.com/protocolbuffers/protobuf/issues/8129
+  * Ensure that null char symbol, package and file names do not result in a
+    crash.
+  * Constant initialize the global message instances
+  * Pretty print 'max' instead of numeric values in reserved ranges.
 
 
   Java
   Java
   * Avoid possible UnsupportedOperationException when using CodedInputSteam
   * Avoid possible UnsupportedOperationException when using CodedInputSteam
@@ -19,10 +35,20 @@ Unreleased Changes (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
   * Make Durations.comparator() and Timestamps.comparator() Serializable.
   * Make Durations.comparator() and Timestamps.comparator() Serializable.
   * Add more detailed error information for dynamic message field type
   * Add more detailed error information for dynamic message field type
     validation failure
     validation failure
+  * Removed declarations of functions declared in java_names.h from
+    java_helpers.h.
+  * Now Proto3 Oneof fields have "has" methods for checking their presence in
+    Java.
+  * Annotates Java proto generated *_FIELD_NUMBER constants.
 
 
   Python
   Python
   * Provided an override for the reverse() method that will reverse the internal
   * Provided an override for the reverse() method that will reverse the internal
     collection directly instead of using the other methods of the BaseContainer.
     collection directly instead of using the other methods of the BaseContainer.
+  * MessageFactory.CreateProtoype can be overridden to customize class creation.
+
+  Javascript
+  * Generate `getDescriptor` methods with `*` as their `this` type.
+  * Enforce `let/const` for generated messages.
 
 
 2020-11-11 version 3.14.0 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
 2020-11-11 version 3.14.0 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
 
 

+ 1 - 1
src/google/protobuf/arena.h

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

+ 2 - 2
src/google/protobuf/generated_message_table_driven_lite.h

@@ -104,7 +104,7 @@ inline std::string* AddField<std::string>(MessageLite* msg, int64 offset) {
 
 
 template <typename Type>
 template <typename Type>
 inline void AddField(MessageLite* msg, int64 offset, Type value) {
 inline void AddField(MessageLite* msg, int64 offset, Type value) {
-  static_assert(std::is_pod<Type>::value,
+  static_assert(std::is_standard_layout<Type>::value && std::is_trivial<Type>::value,
                 "Do not assign");
                 "Do not assign");
   *AddField<Type>(msg, offset) = value;
   *AddField<Type>(msg, offset) = value;
 }
 }
@@ -126,7 +126,7 @@ inline Type* MutableField(MessageLite* msg, uint32* has_bits,
 template <typename Type>
 template <typename Type>
 inline void SetField(MessageLite* msg, uint32* has_bits, uint32 has_bit_index,
 inline void SetField(MessageLite* msg, uint32* has_bits, uint32 has_bit_index,
                      int64 offset, Type value) {
                      int64 offset, Type value) {
-  static_assert(std::is_pod<Type>::value,
+  static_assert(std::is_standard_layout<Type>::value && std::is_trivial<Type>::value,
                 "Do not assign");
                 "Do not assign");
   *MutableField<Type>(msg, has_bits, has_bit_index, offset) = value;
   *MutableField<Type>(msg, has_bits, has_bit_index, offset) = value;
 }
 }

+ 1 - 1
src/google/protobuf/repeated_field.h

@@ -501,7 +501,7 @@ namespace internal {
 // effectively.
 // effectively.
 template <typename Element,
 template <typename Element,
           bool HasTrivialCopy =
           bool HasTrivialCopy =
-              std::is_pod<Element>::value>
+              std::is_standard_layout<Element>::value && std::is_trivialElement>::value>
 struct ElementCopier {
 struct ElementCopier {
   void operator()(Element* to, const Element* from, int array_size);
   void operator()(Element* to, const Element* from, int array_size);
 };
 };