diff --git a/include/boost/type_traits/is_virtual_base_of.hpp b/include/boost/type_traits/is_virtual_base_of.hpp
index e3dd441..30b34f6 100644
--- a/include/boost/type_traits/is_virtual_base_of.hpp
+++ b/include/boost/type_traits/is_virtual_base_of.hpp
@@ -42,14 +42,14 @@ struct is_virtual_base_of_impl
X();
X(const X&);
X& operator=(const X&);
- ~X();
+ ~X()throw();
};
struct Y : public virtual Derived
{
Y();
Y(const Y&);
Y& operator=(const Y&);
- ~Y();
+ ~Y()throw();
};
#else
struct X : Derived, virtual Base
@@ -57,14 +57,14 @@ struct is_virtual_base_of_impl
X();
X(const X&);
X& operator=(const X&);
- ~X();
+ ~X()throw();
};
struct Y : Derived
{
Y();
Y(const Y&);
Y& operator=(const Y&);
- ~Y();
+ ~Y()throw();
};
#endif
BOOST_STATIC_CONSTANT(bool, value = (sizeof(X)==sizeof(Y)));
diff --git a/test/is_virtual_base_of_test.cpp b/test/is_virtual_base_of_test.cpp
index 4e33714..84ba744 100644
--- a/test/is_virtual_base_of_test.cpp
+++ b/test/is_virtual_base_of_test.cpp
@@ -9,6 +9,21 @@
#include "check_integral_constant.hpp"
#include
+// for bug report 3317: https://svn.boost.org/trac/boost/ticket/3317
+class B
+{
+public:
+ B();
+ virtual ~B()throw();
+};
+
+class D : public B
+{
+public:
+ D();
+ virtual ~D()throw();
+};
+
TT_TEST_BEGIN(is_virtual_base_of)
BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of::value), false);
@@ -42,6 +57,9 @@ BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of::value), false);
BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of::value), true);
BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of::value), false);
+BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of::value), true);
+BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of::value), false);
+BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of::value), false);
TT_TEST_END
diff --git a/test/test.hpp b/test/test.hpp
index 8916078..47c3333 100644
--- a/test/test.hpp
+++ b/test/test.hpp
@@ -370,6 +370,7 @@ struct virtual_inherit2 : virtual_inherit1 { };
struct virtual_inherit3 : private virtual Base {};
struct virtual_inherit4 : virtual boost::noncopyable {};
struct virtual_inherit5 : virtual int_convertible {};
+struct virtual_inherit6 : virtual Base { virtual ~virtual_inherit6()throw(); };
typedef void foo0_t();
typedef void foo1_t(int);