Fix array_view dependency on std::min
This commit is contained in:
parent
346c78f5e0
commit
c7f4d4dd27
|
@ -58,8 +58,9 @@ public:
|
||||||
|
|
||||||
constexpr ArrayView subrange(size_t first, size_t count = -1) const
|
constexpr ArrayView subrange(size_t first, size_t count = -1) const
|
||||||
{
|
{
|
||||||
return ArrayView(m_pointer + std::min(first, m_size),
|
auto min = [](size_t a, size_t b) { return a < b ? a : b; };
|
||||||
std::min(count, m_size - std::min(first, m_size)));
|
return ArrayView(m_pointer + min(first, m_size),
|
||||||
|
min(count, m_size - min(first, m_size)));
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user