5#include "Algo/Impl/RangePointerType.h"
9 template<
typename WhereType,
typename WhatType>
10 constexpr WhereType*
FindSequence(WhereType* First, WhereType* Last, WhatType* WhatFirst, WhatType* WhatLast)
14 WhereType* It = First;
15 for (WhatType* WhatIt = WhatFirst; ; ++It, ++WhatIt)
17 if (WhatIt == WhatLast)
25 if (!(*It == *WhatIt))
38
39
40
41
42
43
44
45 template<
typename RangeWhereType,
typename RangeWhatType>
47 ->
decltype(
AlgoImpl::FindSequence( GetData(Where), GetData(Where) + GetNum(Where), GetData(What), GetData(What) + GetNum(What)) )
FORCEINLINE auto FindSequence(const RangeWhereType &Where, const RangeWhatType &What) -> decltype(AlgoImpl::FindSequence(GetData(Where), GetData(Where)+GetNum(Where), GetData(What), GetData(What)+GetNum(What)))
constexpr WhereType * FindSequence(WhereType *First, WhereType *Last, WhatType *WhatFirst, WhatType *WhatLast)