2015-01-27 11:44:46 -05:00
|
|
|
#ifndef RANGE_ALGORITHMS_HPP
|
|
|
|
#define RANGE_ALGORITHMS_HPP
|
|
|
|
|
|
|
|
#include <algorithm>
|
|
|
|
|
|
|
|
namespace osrm
|
|
|
|
{
|
2016-01-05 10:51:13 -05:00
|
|
|
namespace util
|
|
|
|
{
|
2015-01-27 11:44:46 -05:00
|
|
|
|
|
|
|
template <class Container>
|
|
|
|
auto max_element(const Container &c) -> decltype(std::max_element(c.begin(), c.end()))
|
|
|
|
{
|
|
|
|
return std::max_element(c.begin(), c.end());
|
|
|
|
}
|
|
|
|
|
|
|
|
template <class Container>
|
|
|
|
auto max_element(const Container &c) -> decltype(std::max_element(c.cbegin(), c.cend()))
|
|
|
|
{
|
|
|
|
return std::max_element(c.cbegin(), c.cend());
|
|
|
|
}
|
2016-01-05 10:51:13 -05:00
|
|
|
}
|
2015-01-27 11:44:46 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif // RANGE_ALGORITHMS_HPP
|