Skip to content

Commit

Permalink
Do not define a const static variable as constexpr. While this is…
Browse files Browse the repository at this point in the history
… legal it

is not supported in all toolchains.

Fixes #15030

PiperOrigin-RevId: 592197265
  • Loading branch information
protobuf-github-bot authored and copybara-github committed Dec 19, 2023
1 parent 5b34337 commit 6600371
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/google/protobuf/message.cc
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,10 @@ static std::string InitializationErrorStringImpl(const MessageLite& msg) {
return DownCast<const Message&>(msg).InitializationErrorString();
}

constexpr MessageLite::DescriptorMethods Message::kDescriptorMethods = {
GetTypeNameImpl,
InitializationErrorStringImpl,
PROTOBUF_CONSTINIT const MessageLite::DescriptorMethods
Message::kDescriptorMethods = {
GetTypeNameImpl,
InitializationErrorStringImpl,
};

namespace internal {
Expand Down

0 comments on commit 6600371

Please sign in to comment.