diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/o3tl/deleter.hxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/o3tl/deleter.hxx b/include/o3tl/deleter.hxx index 4e90ca5a61f6..72d13d086de1 100644 --- a/include/o3tl/deleter.hxx +++ b/include/o3tl/deleter.hxx @@ -10,6 +10,10 @@ #ifndef INCLUDED_O3TL_DELETER_HXX #define INCLUDED_O3TL_DELETER_HXX +#include <sal/config.h> + +#include <cstdlib> + #include <com/sun/star/uno/Exception.hpp> #include <sal/log.hxx> @@ -44,6 +48,11 @@ template<typename T> struct default_delete } }; +struct free_delete +{ + void operator()(void* p) { std::free(p); } +}; + template<typename uniqueptr> void reset_preserve_ptr_during(uniqueptr& ptr) { // HACK: for the case where the dtor of the obj held by ptr will trigger |