fix(containers): fix the constant branch of Iteration::Distance never entered
This commit is contained in:
parent
e73cf69cb9
commit
615fb2429d
@ -646,7 +646,7 @@ FORCEINLINE constexpr void Advance(I& Iter, ptrdiff N)
|
|||||||
template <CInputIterator I, CSentinelFor<I> S>
|
template <CInputIterator I, CSentinelFor<I> S>
|
||||||
FORCEINLINE constexpr ptrdiff Distance(I First, S Last)
|
FORCEINLINE constexpr ptrdiff Distance(I First, S Last)
|
||||||
{
|
{
|
||||||
if constexpr (CSizedSentinelFor<I, S>)
|
if constexpr (CSizedSentinelFor<S, I>)
|
||||||
{
|
{
|
||||||
return Last - First;
|
return Last - First;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user