Open
Description
Hi folks,
This is in regard to the definition of PROTOBUF_FIELD_OFFSET
:
protobuf/src/google/protobuf/port_def.inc
Lines 311 to 314 in 0644388
The Visual C++ team found that this macro is supposed to cause a compiler error. It uses reinterpret_cast
in constexpr statements, which isn't allowed by the standard. We intend to emit an error for this macro in future versions of MSVC.
Fortunately, MSVC supports __builtin_offsetof
, so we ask that you use that instead. Let me know if you have any questions.
Thank you.