rsl 1.1.0
ROS Support Library
|
#include <algorithm>
Go to the source code of this file.
Functions | |
template<typename Collection > | |
auto | rsl::contains (Collection const &collection, typename Collection::const_reference value) |
Determine if a collection contains a value. Example usage: | |
template<typename Collection > | |
auto | rsl::is_unique (Collection collection) |
Determine if all elements in a collection are unique. Example usage: | |
auto rsl::contains | ( | Collection const & | collection, |
typename Collection::const_reference | value | ||
) |
Determine if a collection contains a value. Example usage:
auto rsl::is_unique | ( | Collection | collection | ) |
Determine if all elements in a collection are unique. Example usage:
Because of how this function is implemented, the collection parameter is taken by value, creating a copy. The implication of this is that it will not work on collections of non-copy-able objects.