Suppress incorrect warnings from GCC 7/8

This commit is contained in:
Peter Dimov
2022-02-03 19:02:19 +02:00
parent cf9d986871
commit 9554d8bbd3

View File

@ -27,6 +27,11 @@ namespace system
// throw_exception_from_error
#if defined(__GNUC__) && __GNUC__ >= 7 && __GNUC__ <= 8
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wattributes"
#endif
BOOST_NORETURN BOOST_NOINLINE inline void throw_exception_from_error( error_code const & e )
{
boost::throw_exception( system_error( e ) );
@ -37,6 +42,10 @@ BOOST_NORETURN BOOST_NOINLINE inline void throw_exception_from_error( std::error
boost::throw_exception( std::system_error( e ) );
}
#if defined(__GNUC__) && __GNUC__ >= 7 && __GNUC__ <= 8
# pragma GCC diagnostic pop
#endif
// in_place_*
using in_place_value_t = variant2::in_place_index_t<0>;