CPP-TOOLBOX
Loading...
Searching...
No Matches
collection_utils.hpp File Reference
#include <functional>
#include <vector>
#include <algorithm>

Go to the source code of this file.

Namespaces

namespace  collection_utils
 

Functions

template<typename T>
std::vector< Tcollection_utils::join_vectors (const std::vector< T > &v1, const std::vector< T > &v2)
 Concatenate two vectors into a single vector.
 
template<typename T, typename Func>
void collection_utils::for_each_in_vector (std::vector< T > &vec, Func func)
 Apply a function to each element of a modifiable vector.
 
template<typename Container>
bool collection_utils::any_of (const Container &c)
 Check if any element in the container evaluates to true.
 
template<typename Container>
bool collection_utils::all_of (const Container &c)
 Check if all elements in the container evaluate to true.
 
template<typename T, typename Func>
void collection_utils::for_each_in_vector (const std::vector< T > &vec, Func func)
 Apply a function to each element of a read-only vector.
 
template<typename T>
std::vector< Tcollection_utils::join_all_vectors (const std::vector< std::vector< T > > &vectors)
 Concatenate a list of vectors into a single vector.
 
template<typename T, typename Func>
auto collection_utils::map_vector (const std::vector< T > &vec, Func func)
 Transform a vector by applying a function to each element.