From fdbe8c34536eddac0a84650e60c2e07a42add038 Mon Sep 17 00:00:00 2001 From: Emil Dotchevski Date: Fri, 4 Dec 2009 06:33:47 +0000 Subject: [PATCH] Simplified type_info support due to improvements in boost/detail/sp_typeinfo.hpp. A few tweaks to better deal with warnings. [SVN r58132] --- include/boost/exception/exception.hpp | 14 ++++++-------- test/1-throw_exception_test.cpp | 3 --- test/3-throw_exception_no_integration_test.cpp | 5 ----- 3 files changed, 6 insertions(+), 16 deletions(-) diff --git a/include/boost/exception/exception.hpp b/include/boost/exception/exception.hpp index 3caca51..79b2739 100644 --- a/include/boost/exception/exception.hpp +++ b/include/boost/exception/exception.hpp @@ -5,10 +5,12 @@ #ifndef UUID_274DA366004E11DCB1DDFE2E56D89593 #define UUID_274DA366004E11DCB1DDFE2E56D89593 - #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 namespace boost @@ -370,10 +372,6 @@ boost { } -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable:4512) //assignment operator could not be generated -#endif template class clone_impl: @@ -407,9 +405,6 @@ boost throw*this; } }; -#ifdef _MSC_VER -#pragma warning(pop) -#endif } template @@ -421,4 +416,7 @@ boost } } +#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#pragma warning(pop) +#endif #endif diff --git a/test/1-throw_exception_test.cpp b/test/1-throw_exception_test.cpp index 02e6b3b..5106e86 100644 --- a/test/1-throw_exception_test.cpp +++ b/test/1-throw_exception_test.cpp @@ -7,9 +7,6 @@ #include #include -#ifdef BOOST_MSVC -#pragma warning(disable:4702) //unreachable code -#endif class my_exception: public std::exception { }; diff --git a/test/3-throw_exception_no_integration_test.cpp b/test/3-throw_exception_no_integration_test.cpp index 706b40d..6fa78f5 100644 --- a/test/3-throw_exception_no_integration_test.cpp +++ b/test/3-throw_exception_no_integration_test.cpp @@ -7,11 +7,6 @@ #include #include -#include -#ifdef BOOST_MSVC -#pragma warning(disable:4702) //unreachable code -#endif - class my_exception: public std::exception { }; int