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