view: indexing operator returns non-const iterators
This commit is contained in:
parent
f610a70950
commit
e1e5efb357
2
view.hpp
2
view.hpp
@ -43,7 +43,7 @@ namespace util {
|
|||||||
constexpr size_t size (void) const noexcept;
|
constexpr size_t size (void) const noexcept;
|
||||||
|
|
||||||
constexpr value_type& operator[] (size_t) noexcept;
|
constexpr value_type& operator[] (size_t) noexcept;
|
||||||
constexpr const value_type& operator[] (size_t) const noexcept;
|
constexpr value_type& operator[] (size_t) const noexcept;
|
||||||
|
|
||||||
bool operator== (view) const noexcept;
|
bool operator== (view) const noexcept;
|
||||||
|
|
||||||
|
2
view.ipp
2
view.ipp
@ -114,7 +114,7 @@ util::view<T>::size (void) const noexcept
|
|||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
template <typename T>
|
template <typename T>
|
||||||
constexpr
|
constexpr
|
||||||
const typename util::view<T>::value_type&
|
typename util::view<T>::value_type&
|
||||||
util::view<T>::operator[] (size_t idx) const noexcept
|
util::view<T>::operator[] (size_t idx) const noexcept
|
||||||
{
|
{
|
||||||
return m_begin[idx];
|
return m_begin[idx];
|
||||||
|
Loading…
Reference in New Issue
Block a user