Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
EqualityComparable.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "Templates/Models.h"
6
7/**
8 * Describes a type comparable with another type.
9 */
11 template <typename T, typename U>
12 auto Requires(bool& Result, const T& A, const U& B) -> decltype(
13 Result = A == B,
14 Result = B == A,
15 Result = A != B,
16 Result = B != A
17 );
18};
19
20/**
21 * Describes a type comparable with itself.
22 */
24 template <typename T>
25 auto Requires() -> decltype(
26 Refines<CEqualityComparableWith, T, T>()
27 );
28};
auto Requires() -> decltype(Refines< CEqualityComparableWith, T, T >())
auto Requires(bool &Result, const T &A, const U &B) -> decltype(Result=A==B, Result=B==A, Result=A !=B, Result=B !=A)