diff --git a/view/move.h b/view/move.h index be9ec9d9..185df24c 100644 --- a/view/move.h +++ b/view/move.h @@ -48,6 +48,7 @@ class _moveView OEL_REQUIRES(iter_is_random_access< iterator_t >) OEL_ALWAYS_INLINE { return begin()[index]; } constexpr View base() && { return std::move(_base); } + constexpr View base() const && { return _base; } constexpr const View & base() const & noexcept { return _base; } }; diff --git a/view/owning.h b/view/owning.h index 4e1c0021..9985c7d9 100644 --- a/view/owning.h +++ b/view/owning.h @@ -49,8 +49,9 @@ class owning constexpr decltype(auto) operator[](difference_type index) OEL_REQUIRES(iter_is_random_access< iterator_t >) { return adl_begin(_r)[index]; } - constexpr Range && base() && noexcept { return std::move(_r); } - constexpr const Range & base() const & noexcept { return _r; } + constexpr Range base() && { return std::move(_r); } + constexpr const Range & base() const & noexcept { return _r; } + void base() const && = delete; }; } diff --git a/view/transform.h b/view/transform.h index 7d33668d..8b381642 100644 --- a/view/transform.h +++ b/view/transform.h @@ -75,6 +75,7 @@ class _transformView constexpr bool empty() { return _m.first.empty(); } constexpr View base() && { return std::move(_m.first); } + constexpr View base() const && { return _m.first; } constexpr const View & base() const & noexcept { return _m.first; } }; diff --git a/view/transform_iterator.h b/view/transform_iterator.h index d97dc955..8124f1fb 100644 --- a/view/transform_iterator.h +++ b/view/transform_iterator.h @@ -49,6 +49,7 @@ class transform_iterator constexpr transform_iterator(UnaryFunc f, Iterator it) : _m{std::move(it), std::move(f)} {} constexpr Iterator base() && { return std::move(_m.first); } + constexpr Iterator base() const && { return _m.first; } constexpr const Iterator & base() const & noexcept OEL_ALWAYS_INLINE { return _m.first; } constexpr reference operator*() const