From 555168d9a354595e0ea6f2355091dbf71cd7da56 Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Mon, 14 Nov 2016 21:30:35 +1100 Subject: [PATCH] view: implement non-const indexing operator --- view.ipp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/view.ipp b/view.ipp index 9406a9b0..0b526c5d 100644 --- a/view.ipp +++ b/view.ipp @@ -150,6 +150,16 @@ util::view::operator[] (size_t idx) const noexcept } +//----------------------------------------------------------------------------- +template +constexpr +typename util::view::value_type& +util::view::operator[] (size_t idx) noexcept +{ + return m_begin[idx]; +} + + /////////////////////////////////////////////////////////////////////////////// template bool