Navigation
API > API/Runtime > API/Runtime/Core > API/Runtime/Core/Algo > API/Runtime/Core/Algo/Algo__MaxElement
References
| Module | Core |
| Header | /Engine/Source/Runtime/Core/Public/Algo/MaxElement.h |
| Include | #include "Algo/MaxElement.h" |
namespace Algo
{
template<typename RangeType, typename ComparatorType>
auto Algo&58;&58;MaxElement
&40;
RangeType & Range,
ComparatorType Comp
&41;
}
Remarks
Returns a pointer to the maximum element in a range with a user-defined binary comparator. If the range contains multiple maximum elements, a pointer to the first one will be returned. A pointer to the maximum element, or nullptr if the range was empty.
Parameters
| Name | Description |
|---|---|
| Range | The range to find the maximum element in. |
| Comp | The comparator to use when comparing two elements. |