fix(algorithms): fix requires for Algorithms::Distance()
This commit is contained in:
parent
db855d27a1
commit
aa572542e2
@ -115,11 +115,11 @@ NODISCARD FORCEINLINE constexpr ptrdiff Distance(I First, S Last)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @return The size of the range. */
|
/** @return The size of the range. The range will not be modified if it is a sized range. */
|
||||||
template <CRange R>
|
template <CRange R>
|
||||||
NODISCARD FORCEINLINE constexpr ptrdiff Distance(R&& Range)
|
NODISCARD FORCEINLINE constexpr ptrdiff Distance(R&& Range)
|
||||||
{
|
{
|
||||||
if constexpr (CSizedRange<R>)
|
if constexpr (CSizedRange<R&>)
|
||||||
{
|
{
|
||||||
return static_cast<ptrdiff>(Ranges::Num(Range));
|
return static_cast<ptrdiff>(Ranges::Num(Range));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user