view: index operator should return auto

This commit is contained in:
Danny Robson 2023-05-15 10:32:13 +10:00
parent 7a37d9b404
commit 4c1fb3889a

View File

@ -489,7 +489,7 @@ namespace cruft {
/////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////
constexpr auto&& constexpr decltype(auto)
operator[] (size_t idx) noexcept operator[] (size_t idx) noexcept
{ {
CHECK_GE (idx, 0u); CHECK_GE (idx, 0u);
@ -499,7 +499,7 @@ namespace cruft {
} }
//--------------------------------------------------------------------- //---------------------------------------------------------------------
constexpr auto&& constexpr decltype(auto)
operator[] (size_t idx) const noexcept operator[] (size_t idx) const noexcept
{ {
CHECK_GE (idx, 0u); CHECK_GE (idx, 0u);