diff options
Diffstat (limited to 'src/algorithms.h')
-rw-r--r-- | src/algorithms.h | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/src/algorithms.h b/src/algorithms.h deleted file mode 100644 index 80e3e27..0000000 --- a/src/algorithms.h +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | #ifndef ALGORITHMS_H_1DDC517E | ||
2 | #define ALGORITHMS_H_1DDC517E | ||
3 | |||
4 | template< typename ContainerT, typename PredicateT > | ||
5 | void erase_if( ContainerT& items, const PredicateT& predicate ) { | ||
6 | for( auto it = items.begin(); it != items.end(); ) { | ||
7 | if( predicate(*it) ) it = items.erase(it); | ||
8 | else ++it; | ||
9 | } | ||
10 | }; | ||
11 | |||
12 | #endif /* end of include guard: ALGORITHMS_H_1DDC517E */ | ||