From f94638e5225afff877347576ff7b4170971e7a2a Mon Sep 17 00:00:00 2001 From: Emil Dotchevski Date: Wed, 28 Sep 2016 17:01:26 -0700 Subject: [PATCH] Configuration option to allow Boost Exception to use std::shared_ptr instead of boost::shared_ptr. --- include/boost/exception/exception.hpp | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/include/boost/exception/exception.hpp b/include/boost/exception/exception.hpp index 2f9676d..c0fdaf9 100644 --- a/include/boost/exception/exception.hpp +++ b/include/boost/exception/exception.hpp @@ -12,6 +12,14 @@ #pragma warning(push,1) #endif +#ifdef BOOST_EXCEPTION_MINI_BOOST +#include +namespace boost { namespace exception_detail { using std::shared_ptr; } } +#else +namespace boost { template class shared_ptr; }; +namespace boost { namespace exception_detail { using boost::shared_ptr; } } +#endif + namespace boost { @@ -144,9 +152,6 @@ boost # endif #endif - template - class shared_ptr; - namespace exception_detail { @@ -449,6 +454,11 @@ boost { } +#if defined(__GNUC__) +# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4) +# pragma GCC visibility push (default) +# endif +#endif template class clone_impl: @@ -490,6 +500,11 @@ boost } }; } +#if defined(__GNUC__) +# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4) +# pragma GCC visibility pop +# endif +#endif template inline