summaryrefslogtreecommitdiff
path: root/include/stdalgo.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/stdalgo.h')
-rw-r--r--include/stdalgo.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/stdalgo.h b/include/stdalgo.h
index 758845312..3cbb86350 100644
--- a/include/stdalgo.h
+++ b/include/stdalgo.h
@@ -63,4 +63,16 @@ namespace stdalgo
return false;
}
}
+
+ /**
+ * Deleter that uses operator delete to delete the item
+ */
+ template <typename T>
+ struct defaultdeleter
+ {
+ void operator()(T* o)
+ {
+ delete o;
+ }
+ };
}