diff --git a/include/boost/system/detail/error_category_impl.hpp b/include/boost/system/detail/error_category_impl.hpp index 30ae9f4..d165df9 100644 --- a/include/boost/system/detail/error_category_impl.hpp +++ b/include/boost/system/detail/error_category_impl.hpp @@ -139,6 +139,11 @@ inline BOOST_NOINLINE void error_category::init_stdcat() const } } +#if defined( BOOST_GCC ) && BOOST_GCC >= 40800 && BOOST_GCC < 70000 +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif + inline error_category::operator std::error_category const & () const { if( id_ == detail::generic_category_id ) @@ -179,6 +184,10 @@ inline error_category::operator std::error_category const & () const return *static_cast( static_cast( stdcat_ ) ); } +#if defined( BOOST_GCC ) && BOOST_GCC >= 40800 && BOOST_GCC < 70000 +#pragma GCC diagnostic pop +#endif + } // namespace system } // namespace boost