请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
器件型号:TMS570LC4357
can_rx_messages.insert(make_pair(can_id、本);
"src/can_service.cpp", line 130: remark #342-D: value copied to temporary,
reference to temporary used
can_rx_messages.insert(make_pair(can_id, this));
上述代码在 gcc 和 ARM 编译器上正常工作。 在此编译器上、代码会生成如上所示的消息并使程序崩溃。CAN_Rx_MESSAGES 是一个 std::::map、其中使用 uint32_t 密钥和自定义派生对象指针作为值。