mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-03-19 04:52:59 +01:00
Merge pull request #80 from redboltz/fix_enum_member_test
Fixed dereferencing type-punned pointer will break strict-aliasing rules warning
This commit is contained in:
commit
fbec8f4470
@ -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;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user