Skip to content
Snippets Groups Projects
Commit eba63c68 authored by hcasse's avatar hcasse
Browse files

data: added addAll() function.

parent ebf8c727
No related branches found
No related tags found
No related merge requests found
......@@ -142,6 +142,10 @@ Pair<typename C1::Iter, typename C2::Iter> mismatch(const C1& c1, const C2& c2,
}
template <class C>
inline void deleteAll(const C& c) { for(auto i: c) delete i; }
// useful function
template <class C>
inline typename C::t sum(const C& c)
......
......@@ -640,6 +640,16 @@ struct FunctionWithArg {
*/
/**
* @fn void deleteAll(const C& c);
* Consider that c is a collection of pointers and call the deletion on each
* of these pointers.
* @param c Collection of pointers to delete.
* @param C Type of collection.
* @ingroup data
*/
/**
* @fn Pair<typename C1::Iter, typename C2::Iter> mismatch(const C1& c1, const C2& c2, P p);
* Find the point of difference of two collection. Starting from the first
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment