Added from_to sequence diagram generator for plantuml

This commit is contained in:
Bartek Kryza
2023-08-27 17:48:33 +02:00
parent 8a362c3c7a
commit ae55b7c054
7 changed files with 212 additions and 158 deletions

View File

@@ -351,6 +351,15 @@ void for_each_if(const T &collection, C &&cond, F &&func)
});
}
template <typename R, typename T, typename F>
std::vector<R> map(const std::vector<T> &in, F &&f)
{
std::vector<R> out;
std::transform(
in.cbegin(), in.cend(), std::back_inserter(out), std::forward<F>(f));
return out;
}
template <typename T, typename F, typename FElse>
void if_not_null(const T *pointer, F &&func, FElse &&func_else)
{