Closed MashoujiangPlusAI closed 2 years ago
This happens because GCC doesn't allow to form a reference to a packed field. Workaround for a single field:
BINLOG_INFO("Hello {}!", std::uint32_t{message->msg_id});
To make the whole struct loggable with BINLOG_ADAPT_STRUCT
, introduce getters, that simply return the field by value: http://binlog.org/UserGuide.html#logging-user-defined-structures
Got it, thank you very much!
Hi everyone,
I don't want to be a nuisance :), but I meet another compiling issue for below code, which is a struct with packed attribute. And without the attribute, we could compile the code successfully. See below code or here demo