Commit 99951647 authored by Sebastian Holtermann's avatar Sebastian Holtermann

cmAlgorithms: Add cmAppend function

The new `cmAppend` function simplifies appending ranges of values to a
`std::vector`.
parent f03a80ae
......@@ -171,6 +171,18 @@ void cmDeleteAll(Range const& r)
ContainerAlgorithms::DefaultDeleter<Range>());
}
template <typename T, typename Range>
void cmAppend(std::vector<T>& v, Range const& r)
{
v.insert(v.end(), r.begin(), r.end());
}
template <typename T, typename InputIt>
void cmAppend(std::vector<T>& v, InputIt first, InputIt last)
{
v.insert(v.end(), first, last);
}
template <typename Range>
std::string cmJoin(Range const& r, const char* delimiter)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment