Hi,

When I switched Boost.Python from its own version of is_polymorphic to
the current type trait, I started getting the following warning from
GCC:

    c:/boost/boost/type_traits/is_polymorphic.hpp:22: warning: `struct 
       boost::detail::is_polymorphic_imp1<V>::d1' has virtual functions but 
       non-virtual destructor


So I just patched is_polymorphic.hpp as follows:

*** is_polymorphic.hpp  21 Nov 2002 08:46:49 -0000      1.4
--- is_polymorphic.hpp  27 Nov 2002 16:39:14 -0000      1.5
***************
*** 21,27 ****
--- 21,29 ----
     struct d1 : public ncvT
     {
        d1();
+ # if !defined(__GNUC__) // this raises warnings with some classes, and buys nothing 
+with GCC
        ~d1()throw();
+ # endif 
        char padding[256];
     };
     struct d2 : public ncvT

I assume the current definition of ~d1() is because some compilers
generate an implicit destructor with a non-empty
exception-specification, which then causes an error? I'm wondering if
we wouldn't be better off just defining ~d1 for those compilers, since
many other compilers are likely to raise the same warning as above.

-- 
                       David Abrahams
   [EMAIL PROTECTED] * http://www.boost-consulting.com
Boost support, enhancements, training, and commercial distribution

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to