Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r60868 - in trunk: boost/python/detail libs/python/test
From: steven_at_[hidden]
Date: 2010-03-26 15:04:41


Author: steven_watanabe
Date: 2010-03-26 15:04:40 EDT (Fri, 26 Mar 2010)
New Revision: 60868
URL: http://svn.boost.org/trac/boost/changeset/60868

Log:
Handle the destructor call in a way that keeps msvc happy. Fixes #4003
Text files modified:
   trunk/boost/python/detail/destroy.hpp | 2 +-
   trunk/libs/python/test/destroy_test.cpp | 4 ++++
   2 files changed, 5 insertions(+), 1 deletions(-)

Modified: trunk/boost/python/detail/destroy.hpp
==============================================================================
--- trunk/boost/python/detail/destroy.hpp (original)
+++ trunk/boost/python/detail/destroy.hpp 2010-03-26 15:04:40 EDT (Fri, 26 Mar 2010)
@@ -30,7 +30,7 @@
     template <class T>
     static void execute(T const volatile* p)
     {
- p->T::~T();
+ p->~T();
     }
 };
 

Modified: trunk/libs/python/test/destroy_test.cpp
==============================================================================
--- trunk/libs/python/test/destroy_test.cpp (original)
+++ trunk/libs/python/test/destroy_test.cpp 2010-03-26 15:04:40 EDT (Fri, 26 Mar 2010)
@@ -22,6 +22,10 @@
         *kills++ = n;
     }
     int n;
+
+ // This used to cause compiler errors with MSVC 9.0.
+ foo& operator~();
+ foo& T();
 };
 
 void assert_destructions(int n)


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk