diff --git a/Redcraft.Utility/Source/Public/Containers/Array.h b/Redcraft.Utility/Source/Public/Containers/Array.h index 24b58d9..13306fe 100644 --- a/Redcraft.Utility/Source/Public/Containers/Array.h +++ b/Redcraft.Utility/Source/Public/Containers/Array.h @@ -66,7 +66,7 @@ public: { if constexpr (CForwardIterator) { - if (CSizedSentinelFor) { checkf(First <= Last, TEXT("Illegal range iterator. Please check First <= Last.")); } + if constexpr (CSizedSentinelFor) { checkf(First - Last <= 0, TEXT("Illegal range iterator. Please check First <= Last.")); } const size_t Count = Iteration::Distance(First, Last); @@ -418,7 +418,7 @@ public: if constexpr (CForwardIterator) { - if (CSizedSentinelFor) { checkf(First <= Last, TEXT("Illegal range iterator. Please check First <= Last.")); } + if constexpr (CSizedSentinelFor) { checkf(First - Last <= 0, TEXT("Illegal range iterator. Please check First <= Last.")); } const size_t InsertIndex = Iter - Begin(); const size_t Count = Iteration::Distance(First, Last); diff --git a/Redcraft.Utility/Source/Public/Containers/Bitset.h b/Redcraft.Utility/Source/Public/Containers/Bitset.h index a233d57..26dd9a0 100644 --- a/Redcraft.Utility/Source/Public/Containers/Bitset.h +++ b/Redcraft.Utility/Source/Public/Containers/Bitset.h @@ -106,7 +106,7 @@ public: { if constexpr (CForwardIterator) { - if (CSizedSentinelFor) { checkf(First <= Last, TEXT("Illegal range iterator. Please check First <= Last.")); } + if constexpr (CSizedSentinelFor) { checkf(First - Last <= 0, TEXT("Illegal range iterator. Please check First <= Last.")); } const size_t InCount = Iteration::Distance(First, Last); diff --git a/Redcraft.Utility/Source/Public/String/String.h b/Redcraft.Utility/Source/Public/String/String.h index 7d0007a..2feff1a 100644 --- a/Redcraft.Utility/Source/Public/String/String.h +++ b/Redcraft.Utility/Source/Public/String/String.h @@ -471,7 +471,7 @@ public: if constexpr (CForwardIterator) { - if (CSizedSentinelFor) { checkf(First <= Last, TEXT("Illegal range iterator. Please check First <= Last.")); } + if constexpr (CSizedSentinelFor) { checkf(First - Last <= 0, TEXT("Illegal range iterator. Please check First <= Last.")); } const size_t InsertIndex = First - this->Begin();