view: indexing operator returns non-const iterators

This commit is contained in:
Danny Robson 2016-02-10 13:07:13 +11:00
parent f610a70950
commit e1e5efb357
2 changed files with 2 additions and 2 deletions

View File

@ -43,7 +43,7 @@ namespace util {
constexpr size_t size (void) const 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;

View File

@ -114,7 +114,7 @@ util::view<T>::size (void) const noexcept
///////////////////////////////////////////////////////////////////////////////
template <typename T>
constexpr
const typename util::view<T>::value_type&
typename util::view<T>::value_type&
util::view<T>::operator[] (size_t idx) const noexcept
{
return m_begin[idx];