From 9704387fdcabf6c8107cc6bc9ff1284f8e33a3cf Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Tue, 26 Dec 2017 17:32:06 +1100 Subject: [PATCH] view: use auto return type for indexing --- view.hpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/view.hpp b/view.hpp index 4f65c063..b74c77a6 100644 --- a/view.hpp +++ b/view.hpp @@ -210,7 +210,7 @@ namespace util { /////////////////////////////////////////////////////////////////////// - constexpr value_type& + constexpr auto& operator[] (size_t idx)& noexcept { auto it = begin (); @@ -219,7 +219,7 @@ namespace util { } //--------------------------------------------------------------------- - constexpr const value_type& + constexpr auto& operator[] (size_t idx) const& noexcept { auto it = begin (); @@ -343,7 +343,6 @@ namespace util { view make_view (std::basic_string&&) = delete; - /////////////////////////////////////////////////////////////////////////// template constexpr bool