Fix reverse iterators for spans

This commit is contained in:
Chris Robinson 2019-12-25 21:48:40 -08:00
parent f153def941
commit 06b7c63cef

View File

@ -137,10 +137,10 @@ public:
constexpr const_iterator cbegin() const noexcept { return mData; } constexpr const_iterator cbegin() const noexcept { return mData; }
constexpr const_iterator cend() const noexcept { return mData+E; } constexpr const_iterator cend() const noexcept { return mData+E; }
constexpr reverse_iterator rbegin() const noexcept { return end(); } constexpr reverse_iterator rbegin() const noexcept { return reverse_iterator{end()}; }
constexpr reverse_iterator rend() const noexcept { return begin(); } constexpr reverse_iterator rend() const noexcept { return reverse_iterator{begin()}; }
constexpr const_reverse_iterator crbegin() const noexcept { return cend(); } constexpr const_reverse_iterator crbegin() const noexcept { return const_reverse_iterator{cend()}; }
constexpr const_reverse_iterator crend() const noexcept { return cbegin(); } constexpr const_reverse_iterator crend() const noexcept { return const_reverse_iterator{cbegin()}; }
template<size_t C> template<size_t C>
constexpr span<element_type,C> first() const constexpr span<element_type,C> first() const
@ -232,10 +232,10 @@ public:
constexpr const_iterator cbegin() const noexcept { return mData; } constexpr const_iterator cbegin() const noexcept { return mData; }
constexpr const_iterator cend() const noexcept { return mDataEnd; } constexpr const_iterator cend() const noexcept { return mDataEnd; }
constexpr reverse_iterator rbegin() const noexcept { return end(); } constexpr reverse_iterator rbegin() const noexcept { return reverse_iterator{end()}; }
constexpr reverse_iterator rend() const noexcept { return begin(); } constexpr reverse_iterator rend() const noexcept { return reverse_iterator{begin()}; }
constexpr const_reverse_iterator crbegin() const noexcept { return cend(); } constexpr const_reverse_iterator crbegin() const noexcept { return const_reverse_iterator{cend()}; }
constexpr const_reverse_iterator crend() const noexcept { return cbegin(); } constexpr const_reverse_iterator crend() const noexcept { return const_reverse_iterator{cbegin()}; }
template<size_t C> template<size_t C>
constexpr span<element_type,C> first() const constexpr span<element_type,C> first() const