From aa572542e2665a29894a844d53bbfba0d0e93119 Mon Sep 17 00:00:00 2001 From: Redstone1024 <2824517378@qq.com> Date: Sun, 22 Dec 2024 15:21:09 +0800 Subject: [PATCH] fix(algorithms): fix requires for Algorithms::Distance() --- Redcraft.Utility/Source/Public/Algorithms/Basic.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Redcraft.Utility/Source/Public/Algorithms/Basic.h b/Redcraft.Utility/Source/Public/Algorithms/Basic.h index 7ea63e1..f967f7d 100644 --- a/Redcraft.Utility/Source/Public/Algorithms/Basic.h +++ b/Redcraft.Utility/Source/Public/Algorithms/Basic.h @@ -115,11 +115,11 @@ NODISCARD FORCEINLINE constexpr ptrdiff Distance(I First, S Last) } } -/** @return The size of the range. */ +/** @return The size of the range. The range will not be modified if it is a sized range. */ template NODISCARD FORCEINLINE constexpr ptrdiff Distance(R&& Range) { - if constexpr (CSizedRange) + if constexpr (CSizedRange) { return static_cast(Ranges::Num(Range)); }