From b134765d4b7b874aab110bf82eb941a4da18a531 Mon Sep 17 00:00:00 2001 From: Redstone1024 <2824517378@qq.com> Date: Sun, 29 Sep 2024 12:13:31 +0800 Subject: [PATCH] fix(containers): fix return value type issue for iterator convenience functions --- Redcraft.Utility/Source/Public/Containers/Iterator.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Redcraft.Utility/Source/Public/Containers/Iterator.h b/Redcraft.Utility/Source/Public/Containers/Iterator.h index c884b8e..58f3292 100644 --- a/Redcraft.Utility/Source/Public/Containers/Iterator.h +++ b/Redcraft.Utility/Source/Public/Containers/Iterator.h @@ -611,28 +611,28 @@ TOutputIterator(F) -> TOutputIterator; /** Creates a TReverseIterator of type inferred from the argument. */ template requires (CBidirectionalIterator> && CConstructibleFrom, I>) -NODISCARD FORCEINLINE constexpr TReverseIterator MakeReverseIterator(I&& Iter) +NODISCARD FORCEINLINE constexpr auto MakeReverseIterator(I&& Iter) { return TReverseIterator>(Forward(Iter)); } /** Creates a TMoveIterator of type inferred from the argument. */ template requires (CInputIterator> && CConstructibleFrom, I>) -NODISCARD FORCEINLINE constexpr TMoveIterator MakeMoveIterator(I&& Iter) +NODISCARD FORCEINLINE constexpr auto MakeMoveIterator(I&& Iter) { return TMoveIterator>(Forward(Iter)); } /** Creates a TMoveSentinel of type inferred from the argument. */ template requires (CSemiregular> && CConstructibleFrom, I>) -NODISCARD FORCEINLINE constexpr TMoveSentinel MakeMoveSentinel(I&& Iter) +NODISCARD FORCEINLINE constexpr auto MakeMoveSentinel(I&& Iter) { return TMoveSentinel>(Forward(Iter)); } /** Creates a TCountedIterator of type inferred from the argument. */ template requires (CInputOrOutputIterator> && CConstructibleFrom, I>) -NODISCARD FORCEINLINE constexpr TCountedIterator MakeCountedIterator(I&& Iter, ptrdiff N) +NODISCARD FORCEINLINE constexpr auto MakeCountedIterator(I&& Iter, ptrdiff N) { return TCountedIterator>(Forward(Iter), N); }