Skip to content

Commit 6d4be7a

Browse files
committed
Handle the destructor call in a way that keeps msvc happy. Fixes #4003
[SVN r60868]
1 parent 65e74cc commit 6d4be7a

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

include/boost/python/detail/destroy.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ struct value_destroyer<
3030
template <class T>
3131
static void execute(T const volatile* p)
3232
{
33-
p->T::~T();
33+
p->~T();
3434
}
3535
};
3636

test/destroy_test.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ struct foo
2222
*kills++ = n;
2323
}
2424
int n;
25+
26+
// This used to cause compiler errors with MSVC 9.0.
27+
foo& operator~();
28+
foo& T();
2529
};
2630

2731
void assert_destructions(int n)

0 commit comments

Comments
 (0)