ext/boost/exception/exception.hpp in passenger-3.9.1.beta vs ext/boost/exception/exception.hpp in passenger-3.9.2.beta
- old
+ new
@@ -308,10 +308,15 @@
////////////////////////////////////////////////////////////////////////
namespace
exception_detail
{
+#if defined(__GNUC__)
+# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)
+# pragma GCC visibility push (default)
+# endif
+#endif
template <class T>
struct
error_info_injector:
public T,
public exception
@@ -324,10 +329,15 @@
~error_info_injector() throw()
{
}
};
+#if defined(__GNUC__)
+# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)
+# pragma GCC visibility pop
+# endif
+#endif
struct large_size { char c[256]; };
large_size dispatch_boost_exception( exception const * );
struct small_size { };
@@ -371,10 +381,15 @@
////////////////////////////////////////////////////////////////////////
namespace
exception_detail
{
+#if defined(__GNUC__)
+# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)
+# pragma GCC visibility push (default)
+# endif
+#endif
class
clone_base
{
public:
@@ -384,10 +399,15 @@
virtual
~clone_base() throw()
{
}
};
+#if defined(__GNUC__)
+# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)
+# pragma GCC visibility pop
+# endif
+#endif
inline
void
copy_boost_exception( exception * a, exception const * b )
{
@@ -408,12 +428,19 @@
template <class T>
class
clone_impl:
public T,
- public clone_base
+ public virtual clone_base
{
+ struct clone_tag { };
+ clone_impl( clone_impl const & x, clone_tag ):
+ T(x)
+ {
+ copy_boost_exception(this,&x);
+ }
+
public:
explicit
clone_impl( T const & x ):
T(x)
@@ -428,10 +455,10 @@
private:
clone_base const *
clone() const
{
- return new clone_impl(*this);
+ return new clone_impl(*this,clone_tag());
}
void
rethrow() const
{