Modified scoped_* to use checked_delete; HP aCC doesn't like the inline assertions.

[SVN r12832]
This commit is contained in:
Peter Dimov committed 2002-02-16 13:23:01 +00:00
1 parent 7981b647c3
commit 2482e00224
2 files changed
+6 -10

No files matched your search

+3 -5
View File
@@ -13,6 +13,7 @@
//
#include <boost/assert.hpp>
#include <boost/checked_delete.hpp>
namespace boost
{
@@ -41,17 +42,14 @@ public:
~scoped_ptr() // never throws
{
typedef char type_must_be_complete[sizeof(T)];
delete ptr;
checked_delete(ptr);
}
void reset(T * p = 0) // never throws
{
typedef char type_must_be_complete[sizeof(T)];
if (ptr != p)
{
delete ptr;
checked_delete(ptr);
ptr = p;
}
}