Detect proto messages based on presence of DebugString.#2837
Detect proto messages based on presence of DebugString.#2837inazarenko wants to merge 3 commits intogoogle:masterfrom inazarenko:duck_type_protos
Conversation
|
Note that this required more metaprogramming magic that I'm really comfortable with, so I'm prepared for a few round-trips of feedback before this is ready to merge. Please let me know if this is the approach you had in mind @asoffer |
kaiwalyakoparkar
left a comment
There was a problem hiding this comment.
These changes should be merged
|
Gentle ping :) |
| template <typename T> | ||
| struct IsAProtocolMessage | ||
| : public std::is_convertible<const T*, const ::proto2::MessageLite*> {}; | ||
| class IsAProtocolMessage { |
There was a problem hiding this comment.
Since we're no longer checking for being a protocol message but rather for DebugString and ShortDebugString, can we change the name to HasDebugStringAndShortDebugString?
There was a problem hiding this comment.
Sure. Should I do it here, or will you pull the changes in through Google's internal source control?
PiperOrigin-RevId: 336087297
PiperOrigin-RevId: 336087297
PiperOrigin-RevId: 336087297
PiperOrigin-RevId: 336087297
PiperOrigin-RevId: 336087297
PiperOrigin-RevId: 336087297
|
@inazarenko this should be working now though as you can see there are merge conflicts because we made a few tweaks to the implementation. Leaving this for you to close. |
fixes #2817 (allows open-source proto messages to be printed using DebugString).
Second attempt, since #2818 was rejected.