4#ifndef TETL_ALGORITHM_MAX_HPP
5#define TETL_ALGORITHM_MAX_HPP
7#include <etl/_functional/less.hpp>
13template <
typename Type,
typename Compare>
14[[nodiscard]]
constexpr auto max(Type
const& a, Type
const& b, Compare comp)
noexcept -> Type
const&
16 return comp(a, b) ? b : a;
21template <
typename Type>
22[[nodiscard]]
constexpr auto max(Type
const& a, Type
const& b)
noexcept -> Type
const&
constexpr auto max(Type const &a, Type const &b) noexcept -> Type const &
Returns the greater of a and b.
Definition max.hpp:22
constexpr auto max(Type const &a, Type const &b, Compare comp) noexcept -> Type const &
Returns the greater of a and b, using a compare function.
Definition max.hpp:14
Definition adjacent_find.hpp:9
Function object for performing comparisons. Unless specialised, invokes operator< on type T....
Definition less.hpp:15