UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
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{
19 template <typename RangeType>
20 [[nodiscard]] UE_REWRITE bool AnyOf(const RangeType& Range)
21 {
22 return !Algo::NoneOf(Range);
23 }
24
33 template <typename RangeType, typename ProjectionType>
34 [[nodiscard]] UE_REWRITE bool AnyOf(const RangeType& Range, ProjectionType Projection)
35 {
36 return !Algo::NoneOf(Range, MoveTemp(Projection));
37 }
38
48 template <typename RangeType, typename ProjectionType>
49 [[nodiscard]] UE_REWRITE bool AnyOf(const RangeType& Range, ProjectionType Projection, ENoRef NoRef)
50 {
51 return !Algo::NoneOf(Range, MoveTemp(Projection), NoRef);
52 }
53}
#define UE_REWRITE
Definition Platform.h:747
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
AUTORTFM_INFER constexpr auto Projection(Invocable0Type &&Invocable0, InvocableTypes &&... Invocables)
Definition Projection.h:108
UE_INTRINSIC_CAST UE_REWRITE constexpr std::remove_reference_t< T > && MoveTemp(T &&Obj) noexcept
Definition UnrealTemplate.h:520
Definition ParallelSort.h:13
UE_REWRITE bool AnyOf(const RangeType &Range)
Definition AnyOf.h:20
bool NoneOf(const RangeType &Range)
Definition NoneOf.h:20
ENoRef
Definition Common.h:10
@ NoRef
Definition Common.h:10