mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-10-20 14:02:40 +02:00
Fixed dereferencing type-punned pointer will break strict-aliasing rules warning.
This commit is contained in:
@@ -843,9 +843,11 @@ public:
|
|||||||
TestEnumType t2;
|
TestEnumType t2;
|
||||||
TestEnumType t3;
|
TestEnumType t3;
|
||||||
|
|
||||||
MSGPACK_DEFINE((int&)t1, (int&)t2, (int&)t3);
|
MSGPACK_DEFINE(t1, t2, t3);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
MSGPACK_ADD_ENUM(TestEnumMemberClass::TestEnumType);
|
||||||
|
|
||||||
TEST(MSGPACK_USER_DEFINED, simple_buffer_enum_member)
|
TEST(MSGPACK_USER_DEFINED, simple_buffer_enum_member)
|
||||||
{
|
{
|
||||||
TestEnumMemberClass val1;
|
TestEnumMemberClass val1;
|
||||||
|
Reference in New Issue
Block a user