UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
AndOrNot.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
10template <typename... Types>
11struct TAnd;
12
13template <bool LHSValue, typename... RHS>
15{
16 static constexpr bool Value = TAnd<RHS...>::value;
17 static constexpr bool value = TAnd<RHS...>::value;
18};
19
20template <typename... RHS>
21struct TAndValue<false, RHS...>
22{
23 static constexpr bool Value = false;
24 static constexpr bool value = false;
25};
26
27template <typename LHS, typename... RHS>
28struct TAnd<LHS, RHS...> : TAndValue<LHS::Value, RHS...>
29{
30};
31
32template <>
33struct TAnd<>
34{
35 static constexpr bool Value = true;
36 static constexpr bool value = true;
37};
38
42template <typename... Types>
43struct TOr;
44
45template <bool LHSValue, typename... RHS>
47{
48 static constexpr bool Value = TOr<RHS...>::value;
49 static constexpr bool value = TOr<RHS...>::value;
50};
51
52template <typename... RHS>
53struct TOrValue<true, RHS...>
54{
55 static constexpr bool Value = true;
56 static constexpr bool value = true;
57};
58
59template <typename LHS, typename... RHS>
60struct TOr<LHS, RHS...> : TOrValue<LHS::Value, RHS...>
61{
62};
63
64template <>
65struct TOr<>
66{
67 static constexpr bool Value = false;
68 static constexpr bool value = false;
69};
70
74template <typename Type>
75struct TNot
76{
77 static constexpr bool Value = !Type::Value;
78 static constexpr bool value = !Type::Value;
79};
80
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
return true
Definition ExternalRpcRegistry.cpp:601
@ false
Definition radaudio_common.h:23
Definition AndOrNot.h:15
static constexpr bool value
Definition AndOrNot.h:17
static constexpr bool Value
Definition AndOrNot.h:16
Definition AndOrNot.h:11
Definition AndOrNot.h:76
static constexpr bool value
Definition AndOrNot.h:78
static constexpr bool Value
Definition AndOrNot.h:77
Definition AndOrNot.h:47
static constexpr bool Value
Definition AndOrNot.h:48
static constexpr bool value
Definition AndOrNot.h:49
Definition AndOrNot.h:43