Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
Greater.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreTypes.h"
7
8/**
9 * Binary predicate class for sorting elements in reverse order. Assumes < operator is defined for the template type.
10 *
11 * See: http://en.cppreference.com/w/cpp/utility/functional/greater
12 */
13template <typename T = void>
15{
16 FORCEINLINE bool operator()(const T& A, const T& B) const
17 {
18 return B < A;
19 }
20};
21
22template <>
23struct TGreater<void>
24{
25 template <typename T, typename U>
26 FORCEINLINE bool operator()(T&& A, U&& B) const
27 {
28 return Forward<U>(B) < Forward<T>(A);
29 }
30};
#define FORCEINLINE
Definition Platform.h:644
FORCEINLINE bool operator()(T &&A, U &&B) const
Definition Greater.h:26
FORCEINLINE bool operator()(const T &A, const T &B) const
Definition Greater.h:16