From: Leandro Lucarella Date: Fri, 9 Nov 2007 16:30:17 +0000 (-0300) Subject: Don't do the reinterpret_cast trick anymore for type's operator|. X-Git-Tag: 1.0~3 X-Git-Url: https://git.llucax.com/software/eventxx.git/commitdiff_plain/bc01f816c01124890e91b6c7c8b6a78f91f60963 Don't do the reinterpret_cast trick anymore for type's operator|. --- diff --git a/eventxx b/eventxx index 7b4d950..e54d279 100644 --- a/eventxx +++ b/eventxx @@ -201,9 +201,7 @@ inline type operator| (const type& t1, const type& t2) { int r = static_cast< int >(t1) | static_cast< int >(t2); - int* pr = &r; // Avoid some weird warning about dereferencing - // type-punned pointer will break strict-aliasing rules - return *reinterpret_cast< type* >(pr); + return static_cast< type >(r); }