7#ifndef INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_ALGORITHM_MAX_ELEMENT_HPP_
8#define INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_ALGORITHM_MAX_ELEMENT_HPP_
13#include "arene/base/algorithm/detail/relative_find.hpp"
14#include "arene/base/algorithm/detail/traits.hpp"
17#include "arene/base/functional/detail/flip.hpp"
18#include "arene/base/stdlib_choice/enable_if.hpp"
21#include "arene/base/stdlib_choice/less.hpp"
22#include "arene/base/stdlib_choice/move.hpp"
29namespace algorithm_detail {
30namespace max_element_detail {
67 class ForwardIterator,
68 class Compare = std::less<>,
69 class Projection = identity,
75 constexpr auto operator()(ForwardIterator first, ForwardIterator last, Compare comp = {}, Projection proj = {})
const
77 noexcept(relative_find(
std::move(first),
std::move(last), functional_detail::flip(comp), proj))
78 ) -> ForwardIterator {
79 return relative_find(
std::move(first),
std::move(last), functional_detail::flip(comp), proj);
#define ARENE_CPP14_INLINE_VARIABLE(type, name)
Emulates C++17's inline variable declarations for function objects.
Definition cpp14_inline.hpp:69
Definition accumulate.hpp:37
typename constraints_impl::constraints< EnableIfs... >::type constraints
Helper used to express template constraints in a consistent way using std::enable_if_t.
Definition constraints.hpp:51
Definition accumulate.hpp:36
constexpr auto move(T &&value) noexcept -> remove_reference_t< T > &&
Cast a value to an rvalue.
Definition move.hpp:30
typename enable_if< Condition, Type >::type enable_if_t
Type alias to support constraining templates. Is an alias for the specified type if the Condition is ...
Definition enable_if.hpp:41