Subject: Re: [Boost-bugs] [Boost C++ Libraries] #4003: Error in destroy.hpp when methods "T()" and "operator~()" are defined.
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-03-16 19:35:15
#4003: Error in destroy.hpp when methods "T()" and "operator~()" are defined.
------------------------------------------------------+---------------------
Reporter: Christopher Bruns <cmbruns@â¦> | Owner: dave
Type: Bugs | Status: new
Milestone: Boost 1.43.0 | Component: Python
Version: Boost 1.42.0 | Severity: Problem
Keywords: |
------------------------------------------------------+---------------------
Changes (by steven_watanabe):
* owner: steven_watanabe => dave
Comment:
I would assume that a virtual destructor is okay, but I didn't write the
code in question. A typedef doesn't seem to help. The first name after
the -> always seems to be looked up in the context of T first. I even
tried this:
{{{
template<class T>
struct Destroyer {
typedef T Type;
static void destroy(T* t) {
t->Destroyer<Type>::Type::~Type();
}
};
struct S {
void Type();
void Destroyer();
};
int main() {
S t;
Destroyer<S>::destroy(&t);
}
}}}
and it still fails.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/4003#comment:4> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:02 UTC