From f52e2fe315ec471f6a15c850749c73b210cecb99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Va=CC=81clav=20Slavi=CC=81k?= Date: Sat, 10 Oct 2015 16:44:52 +0200 Subject: [PATCH] Use default visibility for exception_detail::clone_impl<> When building code with hidden visibility on ELF, exception classes must explicitly use the default visibility for catching to work across shared objects; the same must be done for all their base classes. While other classes in the boost::exception_detail namespace had visibility adjusted accordingly, clone_impl didn't, so remedy that. --- include/boost/exception/exception.hpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/boost/exception/exception.hpp b/include/boost/exception/exception.hpp index d762cf8..1f2bd9c 100644 --- a/include/boost/exception/exception.hpp +++ b/include/boost/exception/exception.hpp @@ -432,6 +432,11 @@ boost { } +#if defined(__GNUC__) +# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4) +# pragma GCC visibility push (default) +# endif +#endif template class clone_impl: @@ -473,6 +478,11 @@ boost } }; } +#if defined(__GNUC__) +# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4) +# pragma GCC visibility pop +# endif +#endif template inline