Note that SerializeToArray performs an assertion to check that the all
required fields are present:
https://github.com/google/protobuf/blob/master/src/google/protobuf/message_lite.cc#L321
But
GOOGLE_DCHECK assertions are not enabled for optimized builds since they
take effect only if NDEBUG is not
You can call IsInitialized on Message
On Fri, Jul 1, 2016 at 2:50 PM SAMEER CHAUDHARI <
sameer.m.chaudh...@gmail.com> wrote:
> I am using protobuf ver 2.6.
>
> Also what is the best way to check all required fields are present before
> serialize Message.
> Instead of checking every required