Fix includes and header guards of container functions.

This commit is contained in:
Jonathan G Rennison
2017-03-29 19:39:55 +01:00
parent 8f3e0c4fe5
commit 2fb822d392

View File

@@ -9,6 +9,11 @@
/** @file container_func.hpp Functions related to use of containers. */ /** @file container_func.hpp Functions related to use of containers. */
#ifndef CONTAINER_FUNC_HPP
#define CONTAINER_FUNC_HPP
#include <iterator>
template <typename C, typename UP> unsigned int container_unordered_remove_if (C &container, UP predicate) { template <typename C, typename UP> unsigned int container_unordered_remove_if (C &container, UP predicate) {
unsigned int removecount = 0; unsigned int removecount = 0;
for (auto it = container.begin(); it != container.end();) { for (auto it = container.begin(); it != container.end();) {
@@ -33,3 +38,5 @@ template <typename C, typename V> unsigned int container_unordered_remove(C &con
return v == value; return v == value;
}); });
} }
#endif /* CONTAINER_FUNC_HPP */