diff --git a/Redcraft.Utility/Source/Public/Iterator/Utility.h b/Redcraft.Utility/Source/Public/Iterator/Utility.h index 9c579ad..3a949bd 100644 --- a/Redcraft.Utility/Source/Public/Iterator/Utility.h +++ b/Redcraft.Utility/Source/Public/Iterator/Utility.h @@ -12,11 +12,14 @@ NAMESPACE_PRIVATE_BEGIN template using TWithReference = T&; -template struct TIteratorElementImpl { using Type = typename I::ElementType; }; -template struct TIteratorElementImpl { using Type = TRemoveCV; }; +template struct TIteratorElementImpl { }; +template struct TIteratorElementImpl { using Type = TRemoveCV; }; -template struct TIteratorPointerImpl { using Type = void; }; -template struct TIteratorPointerImpl { using Type = T*; }; +template requires (requires { typename I::ElementType; }) +struct TIteratorElementImpl { using Type = typename I::ElementType; }; + +template struct TIteratorPointerImpl { }; +template struct TIteratorPointerImpl { using Type = T*; }; template requires (requires(I& Iter) { { Iter.operator->() } -> CPointer; }) struct TIteratorPointerImpl { using Type = decltype(DeclVal().operator->()); };