From b76f705b90692ba52fb1e21c5c4348410012c655 Mon Sep 17 00:00:00 2001 From: Emil Dotchevski Date: Tue, 16 Mar 2010 02:41:49 +0000 Subject: [PATCH] Warnings [SVN r60638] --- include/boost/throw_exception.hpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/include/boost/throw_exception.hpp b/include/boost/throw_exception.hpp index 1d018c5..cbccfaf 100644 --- a/include/boost/throw_exception.hpp +++ b/include/boost/throw_exception.hpp @@ -1,5 +1,11 @@ #ifndef BOOST_THROW_EXCEPTION_HPP_INCLUDED #define BOOST_THROW_EXCEPTION_HPP_INCLUDED +#if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#pragma GCC system_header +#endif +#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#pragma warning(push,1) +#endif // MS compatible compilers support #pragma once @@ -20,7 +26,6 @@ // http://www.boost.org/libs/utility/throw_exception.html // -#include #include #include #include @@ -71,7 +76,7 @@ void throw_exception( std::exception const & e ); // user defined inline void throw_exception_assert_compatibility( std::exception const & ) { } -template BOOST_ATTRIBUTE_NORETURN inline void throw_exception( E const & e ) +template inline void throw_exception( E const & e ) { //All boost exceptions are required to derive from std::exception, //to ensure compatibility with BOOST_NO_EXCEPTIONS. @@ -88,4 +93,7 @@ template BOOST_ATTRIBUTE_NORETURN inline void throw_exception( E const } // namespace boost +#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#pragma warning(pop) +#endif #endif // #ifndef BOOST_THROW_EXCEPTION_HPP_INCLUDED