fix(iterator): fix behavior when TIteratorElement or TIteratorPointer is invalid
This commit is contained in:
parent
c73fc7620d
commit
a55f03fea0
@ -12,10 +12,13 @@ NAMESPACE_PRIVATE_BEGIN
|
|||||||
|
|
||||||
template <typename T> using TWithReference = T&;
|
template <typename T> using TWithReference = T&;
|
||||||
|
|
||||||
template <typename I> struct TIteratorElementImpl { using Type = typename I::ElementType; };
|
template <typename I> struct TIteratorElementImpl { };
|
||||||
template <typename T> struct TIteratorElementImpl<T*> { using Type = TRemoveCV<T>; };
|
template <typename T> struct TIteratorElementImpl<T*> { using Type = TRemoveCV<T>; };
|
||||||
|
|
||||||
template <typename I> struct TIteratorPointerImpl { using Type = void; };
|
template <typename I> requires (requires { typename I::ElementType; })
|
||||||
|
struct TIteratorElementImpl<I> { using Type = typename I::ElementType; };
|
||||||
|
|
||||||
|
template <typename I> struct TIteratorPointerImpl { };
|
||||||
template <typename T> struct TIteratorPointerImpl<T*> { using Type = T*; };
|
template <typename T> struct TIteratorPointerImpl<T*> { using Type = T*; };
|
||||||
|
|
||||||
template <typename I> requires (requires(I& Iter) { { Iter.operator->() } -> CPointer; })
|
template <typename I> requires (requires(I& Iter) { { Iter.operator->() } -> CPointer; })
|
||||||
|
Loading…
Reference in New Issue
Block a user