diff -pru include/boost/thread/win32/shared_mutex.hpp /mnt/misc/win64/mingw64-x-boost/boost_1_63_0/boost/thread/win32/shared_mutex.hpp --- a/boost/thread/win32/shared_mutex.hpp 2017-01-19 10:36:42.848867811 -0200 +++ b/boost/thread/win32/shared_mutex.hpp 2017-01-19 12:25:48.782753800 -0200 @@ -27,18 +27,20 @@ namespace boost class shared_mutex { private: - struct state_data + union state_data { - unsigned shared_count:11, - shared_waiting:11, - exclusive:1, - upgrade:1, - exclusive_waiting:7, - exclusive_waiting_blocked:1; - + struct { + unsigned shared_count:11, + shared_waiting:11, + exclusive:1, + upgrade:1, + exclusive_waiting:7, + exclusive_waiting_blocked:1; + }; + long sd_alias; friend bool operator==(state_data const& lhs,state_data const& rhs) { - return *reinterpret_cast(&lhs)==*reinterpret_cast(&rhs); + return lhs.sd_alias == rhs.sd_alias; } };