From 489a429bea6739dfa25503b9329bd9e33bffb856 Mon Sep 17 00:00:00 2001 From: Ira Rice Date: Thu, 25 Sep 2008 00:15:44 +0000 Subject: Merged the Tametomo branch into trunk. --- src/utils/dtor.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/utils') diff --git a/src/utils/dtor.h b/src/utils/dtor.h index 3b8aeb0e..29cde178 100644 --- a/src/utils/dtor.h +++ b/src/utils/dtor.h @@ -24,6 +24,7 @@ #ifndef _TMW_UTILS_DTOR_H #define _TMW_UTILS_DTOR_H +#include #include #include @@ -46,4 +47,11 @@ inline dtor make_dtor(Cont const&) return dtor(); } +template +inline void delete_all(Container &c) +{ + std::for_each(c.begin(), c.end(), make_dtor(c)); +} + + #endif -- cgit v1.2.3-70-g09d2