Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2002-09-21 11:57:40

From: "Peter Dimov" <pdimov_at_[hidden]>

> My reasoning was that has_virtual_destructor (whenever it appears in
> type_traits) would be approximated with is_polymorphic (which is yet to
> appear in type_traits too) anyway.

I'm not sure we want a trait that gives false positives on all

> That aside, making our implementation detect the case implies a new
> dependency on config.hpp (member templates) and on
> type_traits/has_virtual_destructor.hpp. Is scoped_ptr<Base>(new Derived)
> common mistake? I think not, but I might be wrong.

If it's worth storing an extra pointer for every shared object in the
shared_ptr case, surely it's worth detecting this one at compile time?

           David Abrahams * Boost Consulting
dave_at_[hidden] *

Boost list run by bdawes at, gregod at, cpdaniel at, john at