Skip to content

Commit

Permalink
Mark single arg ctor explicit in DynamicMessageFactory.
Browse files Browse the repository at this point in the history
This is in line with best practices since implicit conversion in not necessary nor desired for this class.

PiperOrigin-RevId: 543446110
  • Loading branch information
protobuf-github-bot authored and copybara-github committed Jun 26, 2023
1 parent 6e93573 commit 8fe88a5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/google/protobuf/dynamic_message.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,10 @@ class PROTOBUF_EXPORT DynamicMessageFactory : public MessageFactory {
// parser to look for extensions in an alternate pool. However, note that
// this is almost never what you want to do. Almost all users should use
// the zero-arg constructor.
DynamicMessageFactory(const DescriptorPool* pool);
#ifndef PROTOBUF_FUTURE_BREAKING_CHANGES
explicit
#endif
DynamicMessageFactory(const DescriptorPool* pool);
DynamicMessageFactory(const DynamicMessageFactory&) = delete;
DynamicMessageFactory& operator=(const DynamicMessageFactory&) = delete;

Expand Down

0 comments on commit 8fe88a5

Please sign in to comment.