From 541ca67a061916f777c784d6b2a5cb02d4234bf4 Mon Sep 17 00:00:00 2001
From: Mateusz Karbowiak <69864511+mtszkarbowiak@users.noreply.github.com>
Date: Mon, 7 Oct 2024 03:11:50 +0200
Subject: [PATCH] `Nullable` sfinae fix
---
Source/Engine/Core/Types/Nullable.h | 17 ++++++-----------
1 file changed, 6 insertions(+), 11 deletions(-)
diff --git a/Source/Engine/Core/Types/Nullable.h b/Source/Engine/Core/Types/Nullable.h
index 6ca735d08..985e66090 100644
--- a/Source/Engine/Core/Types/Nullable.h
+++ b/Source/Engine/Core/Types/Nullable.h
@@ -35,11 +35,6 @@ private:
}
}
- ///
- /// true if the wrapped type is copy constructible.
- ///
- constexpr static bool IsCopyConstructible = TIsCopyConstructible::Value;
-
public:
///
/// Initializes by setting the wrapped value to null.
@@ -60,7 +55,7 @@ public:
/// Initializes by copying the wrapped value.
///
/// The initial wrapped value to be copied.
- template::Type>
+ template::Value>::Type>
Nullable(const T& value)
: _value(value)
, _hasValue(true)
@@ -81,7 +76,7 @@ public:
/// Initializes by copying another .
///
/// The wrapped value to be copied.
- template::Type>
+ template::Value>::Type>
Nullable(const Nullable& other)
: _value(other._value)
, _hasValue(other._hasValue)
@@ -106,7 +101,7 @@ public:
///
/// Reassigns the wrapped value by copying.
///
- template::Type>
+ template::Value>::Type>
auto operator=(const T& value) -> Nullable&
{
KillOld();
@@ -133,7 +128,7 @@ public:
///
/// Reassigns the wrapped value by copying another .
///
- template::Type>
+ template::Value>::Type>
auto operator=(const Nullable& other) -> Nullable&
{
KillOld();
@@ -222,7 +217,7 @@ public:
/// Sets the wrapped value by copying.
///
/// The value to be copied.
- template::Type>
+ template::Value>::Type>
FORCE_INLINE void SetValue(const T& value)
{
if (_hasValue)
@@ -250,7 +245,7 @@ public:
/// If the wrapped value is not valid, sets it by copying. Otherwise, does nothing.
///
/// True if the wrapped value was changed, otherwise false.
- template::Type>
+ template::Value>::Type>
FORCE_INLINE bool TrySet(const T& value)
{
if (_hasValue)