view: we really don't need a dedicated find function
This commit is contained in:
parent
9da28a64c9
commit
4a92981379
10
view.hpp
10
view.hpp
@ -63,15 +63,6 @@ namespace util {
|
|||||||
auto data (void) { return begin (); }
|
auto data (void) { return begin (); }
|
||||||
auto data (void) const { return begin (); }
|
auto data (void) const { return begin (); }
|
||||||
|
|
||||||
constexpr T
|
|
||||||
find (const value_type &v) const noexcept
|
|
||||||
{
|
|
||||||
for (T i = cbegin (); i != cend (); ++i)
|
|
||||||
if (*i == v)
|
|
||||||
return i;
|
|
||||||
return cend ();
|
|
||||||
}
|
|
||||||
|
|
||||||
constexpr bool
|
constexpr bool
|
||||||
empty (void) const noexcept
|
empty (void) const noexcept
|
||||||
{
|
{
|
||||||
@ -112,6 +103,7 @@ namespace util {
|
|||||||
T m_end;
|
T m_end;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
template <typename T, size_t N>
|
template <typename T, size_t N>
|
||||||
auto
|
auto
|
||||||
make_view (const T (&arr)[N])
|
make_view (const T (&arr)[N])
|
||||||
|
Loading…
Reference in New Issue
Block a user