From f6f09c16cddb840191cb37e731547dbf52329203 Mon Sep 17 00:00:00 2001 From: Emil Dotchevski Date: Fri, 30 Jan 2009 00:06:01 +0000 Subject: [PATCH] added #error in headers incompatible with BOOST_NO_EXCEPTIONS [SVN r50887] --- include/boost/exception/diagnostic_information.hpp | 5 +++++ include/boost/exception_ptr.hpp | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/include/boost/exception/diagnostic_information.hpp b/include/boost/exception/diagnostic_information.hpp index 99273bc..af10837 100644 --- a/include/boost/exception/diagnostic_information.hpp +++ b/include/boost/exception/diagnostic_information.hpp @@ -6,6 +6,7 @@ #ifndef UUID_0552D49838DD11DD90146B8956D89593 #define UUID_0552D49838DD11DD90146B8956D89593 +#include #include #include #include @@ -22,13 +23,17 @@ boost get_diagnostic_information( exception const & x ) { if( error_info_container * c=x.data_.get() ) +#ifndef BOOST_NO_EXCEPTIONS try { +#endif return c->diagnostic_information(); +#ifndef BOOST_NO_EXCEPTIONS } catch(...) { } +#endif return 0; } } diff --git a/include/boost/exception_ptr.hpp b/include/boost/exception_ptr.hpp index 196329d..5b574d6 100644 --- a/include/boost/exception_ptr.hpp +++ b/include/boost/exception_ptr.hpp @@ -6,6 +6,10 @@ #ifndef UUID_FA5836A2CADA11DC8CD47C8555D89593 #define UUID_FA5836A2CADA11DC8CD47C8555D89593 +#include +#ifdef BOOST_NO_EXCEPTIONS +#error This header requires exception handling to be enabled. +#endif #include #include #include