namespace Msp {
template<typename Container, typename T>
-typename Container::iterator find(Container &cont, const T &value)
+inline typename Container::iterator find(Container &cont, const T &value)
{
return std::find(cont.begin(), cont.end(), value);
}
template<typename Container, typename T>
-typename Container::const_iterator find(const Container &cont, const T &value)
+inline typename Container::const_iterator find(const Container &cont, const T &value)
{
return std::find(cont.begin(), cont.end(), value);
}
template<typename Container, typename Predicate>
-typename Container::iterator find_if(Container &cont, Predicate pred)
+inline typename Container::iterator find_if(Container &cont, Predicate pred)
{
return std::find_if(cont.begin(), cont.end(), pred);
}
template<typename Container, typename Predicate>
-typename Container::const_iterator find_if(const Container &cont, Predicate pred)
+inline typename Container::const_iterator find_if(const Container &cont, Predicate pred)
{
return std::find_if(cont.begin(), cont.end(), pred);
}
+template<typename Container>
+inline void sort(Container &cont)
+{
+ std::sort(cont.begin(), cont.end());
+}
+
+template<typename Container, typename Predicate>
+inline void sort(Container &cont, Predicate pred)
+{
+ std::sort(cont.begin(), cont.end(), pred);
+}
+
+template<typename Container>
+inline void stable_sort(Container &cont)
+{
+ std::stable_sort(cont.begin(), cont.end());
+}
+
+template<typename Container, typename Predicate>
+inline void stable_sort(Container &cont, Predicate pred)
+{
+ std::stable_sort(cont.begin(), cont.end(), pred);
+}
+
} // namespace Msp
#endif