Skip to content

Commit

Permalink
Merge pull request #13288 from mkruskal-google/backports-24
Browse files Browse the repository at this point in the history
Explicitly delete the destructor for the internal `Rep` structure.
  • Loading branch information
mkruskal-google authored Jul 12, 2023
2 parents b411d7d + c27bb62 commit 725a592
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/google/protobuf/repeated_field.h
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,9 @@ class RepeatedField final
Element unused;
};
Element* elements() { return reinterpret_cast<Element*>(this + 1); }

// Avoid 'implicitly deleted dtor' warnings on certain compilers.
~Rep() = delete;
};
static PROTOBUF_CONSTEXPR const size_t kRepHeaderSize = sizeof(Rep);

Expand Down

0 comments on commit 725a592

Please sign in to comment.