Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
AnyOf.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"
6#include "Algo/NoneOf.h"
7#include "Templates/UnrealTemplate.h" // for MoveTemp
8
9
10namespace Algo
11{
12 /**
13 * Checks if any element in the range is truthy.
14 *
15 * @param Range The range to check.
16 *
17 * @return true if at least one element is truthy, false otherwise.
18 */
19 template <typename RangeType>
20 FORCEINLINE bool AnyOf(const RangeType& Range)
21 {
22 return !Algo::NoneOf(Range);
23 }
24
25 /**
26 * Checks if any projection of the elements in the range is truthy.
27 *
28 * @param Range The range to check.
29 * @param Projection The projection to apply to each element.
30 *
31 * @return true if at least one projection is truthy, false otherwise.
32 */
33 template <typename RangeType, typename ProjectionType>
34 FORCEINLINE bool AnyOf(const RangeType& Range, ProjectionType Projection)
35 {
37 }
38
39 /**
40 * Checks if any projection of the elements in the range is truthy.
41 * Should be used when the range iterator doesn't return a reference.
42 *
43 * @param Range The range to check.
44 * @param Projection The projection to apply to each element.
45 *
46 * @return true if at least one projection is truthy, false otherwise.
47 */
48 template <typename RangeType, typename ProjectionType>
49 FORCEINLINE bool AnyOf(const RangeType& Range, ProjectionType Projection, ENoRef NoRef)
50 {
52 }
53}
#define FORCEINLINE
Definition Platform.h:644
Definition Heapify.h:12
FORCEINLINE bool AnyOf(const RangeType &Range)
Definition AnyOf.h:20
FORCEINLINE bool AnyOf(const RangeType &Range, ProjectionType Projection)
Definition AnyOf.h:34
ENoRef
Definition Common.h:10
FORCEINLINE bool AnyOf(const RangeType &Range, ProjectionType Projection, ENoRef NoRef)
Definition AnyOf.h:49