Re: [protobuf] Avoid C++11 warning about switch on proto3 enum w/o default clause?

2017-10-30 Thread chhsiao
Hi Feng, Thanks for answering. As suggested by the official documentation: https://developers.google.com/protocol-buffers/docs/reference/cpp-generated#enum We can handle the unknown enum value through either a `default` clause or an `if` check as follows: // Wrong version of client-side code:

[protobuf] Avoid C++11 warning about switch on proto3 enum w/o default clause?

2017-10-30 Thread chhsiao
Hi all, I'm from the Apache Mesos community and we're working on things that uses proto3. We usually turn on compiler options to report missing values in switch statements, and don't do a "default" clause. This gives us the benefit of capturing missing enum values during compile time. However,

[protobuf] Using CMake under Linux

2017-07-19 Thread chhsiao
Hi all, I was wondering if building protobuf wich cmake under Linux is officially supported. I'm working on a project that would bundle protobuf as a third-party library, and since we're using cmake, I was wondering if I can rely on using protobuf's cmake building system under Linux. According