
On Tue, Sep 22, 2009 at 3:18 AM, Berserker <berserker_r@hotmail.com> wrote:
What's the status about this? If we don't want to "break" the interface, we can always provide an option to enable this feature, something like (same for scoped_array):
template<class T #ifdef BOOST_SCOPED_PTR_ENABLE_DELETER , class D = boost::checked_deleter<T> > #endif class scoped_ptr { // ...
public: ~scoped_ptr() { // ...
#ifdef BOOST_SCOPED_PTR_ENABLE_DELETER deleter()(ptr); #else boost::checked_delete(ptr); #endif } };
BOOST_SCOPED_PTR_ENABLE_DELETER is not defined by default. There are lots of samples like this in other boost libraries, is it reasonable?
No it is not reasonable (IMO). If I write new Boost library A using the deleter, and you write library B not using it, can anyone use *both* of our no doubt great and valuable libraries together in their code? Tony