12#ifndef UTRANGEALGORITHM_HPP
13#define UTRANGEALGORITHM_HPP
23template<
typename Container>
24bool contains(Container
const& c,
typename Container::const_reference v)
26 return std::find(c.begin(), c.end(), v) != c.end();
29template<
typename Key,
typename Cmp,
typename Alloc>
30bool contains(std::set<Key, Cmp, Alloc>
const& s, Key
const& k)
32 return s.find(k) != s.end();
35template<
typename Key,
typename Value,
typename Cmp,
typename Alloc>
36bool contains(std::map<Key, Value, Cmp, Alloc>
const& m, Key
const& k)
38 return m.find(k) != m.end();
44 aVector.erase(std::unique(aVector.begin(), aVector.end()), aVector.end());
48void sort(std::vector<T>& aVector)
50 std::sort(aVector.begin(), aVector.end());
void sort(std::vector< T > &aVector)
Definition UtRangeAlgorithm.hpp:48
bool contains(Container const &c, typename Container::const_reference v)
Definition UtRangeAlgorithm.hpp:24
void unique(std::vector< T > &aVector)
Definition UtRangeAlgorithm.hpp:42