Fixed dereferencing type-punned pointer will break strict-aliasing rules warning.

This commit is contained in:
Takatoshi Kondo 2014-03-31 16:37:29 +09:00
parent cb518f472a
commit 12e8615ac5

View File

@ -843,9 +843,11 @@ public:
TestEnumType t2;
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)
{
TestEnumMemberClass val1;