Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
EqualTo.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
6
7/**
8 * Binary predicate class for performing equality comparisons.
9 *
10 * Uses operator== when available.
11 *
12 * See: https://en.cppreference.com/w/cpp/utility/functional/equal_to
13 */
14template <typename T = void>
16{
17 constexpr auto operator()(const T& Lhs, const T& Rhs) const -> decltype(Lhs == Rhs)
18 {
19 return Lhs == Rhs;
20 }
21};
22
23template <>
24struct TEqualTo<void>
25{
26 template <typename T, typename U>
27 constexpr auto operator()(T&& Lhs, U&& Rhs) const -> decltype(Forward<T>(Lhs) == Forward<U>(Rhs))
28 {
29 return Forward<T>(Lhs) == Forward<U>(Rhs);
30 }
31};
constexpr auto operator()(T &&Lhs, U &&Rhs) const -> decltype(Forward< T >(Lhs)==Forward< U >(Rhs))
Definition EqualTo.h:27
constexpr auto operator()(const T &Lhs, const T &Rhs) const -> decltype(Lhs==Rhs)
Definition EqualTo.h:17