UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
NoneOf.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/Common.h"
7#include "Templates/Invoke.h"
8
9
10namespace Algo
11{
19 template <typename RangeType>
20 [[nodiscard]] bool NoneOf(const RangeType& Range)
21 {
22 for (const auto& Element : Range)
23 {
24 if (Element)
25 {
26 return false;
27 }
28 }
29
30 return true;
31 }
32
41 template <typename RangeType, typename ProjectionType>
42 [[nodiscard]] bool NoneOf(const RangeType& Range, ProjectionType Projection)
43 {
44 for (const auto& Element : Range)
45 {
46 if (Invoke(Projection, Element))
47 {
48 return false;
49 }
50 }
51
52 return true;
53 }
54
64 template <typename RangeType, typename ProjectionType>
65 [[nodiscard]] bool NoneOf(const RangeType& Range, ProjectionType Projection, ENoRef NoRef)
66 {
67 for (const auto Element : Range)
68 {
69 if (Invoke(Projection, Element))
70 {
71 return false;
72 }
73 }
74
75 return true;
76 }
77}
AUTORTFM_INFER UE_FORCEINLINE_HINT constexpr auto Invoke(FuncType &&Func, ArgTypes &&... Args) -> decltype(((FuncType &&) Func)((ArgTypes &&) Args...))
Definition Invoke.h:44
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
Definition ParallelSort.h:13
bool NoneOf(const RangeType &Range)
Definition NoneOf.h:20
ENoRef
Definition Common.h:10
@ NoRef
Definition Common.h:10