Weakened cast in span::iterator.

This commit is contained in:
Neil MacIntosh 2016-07-20 08:52:09 -07:00
parent 520c72d777
commit 0c1b6717c1

View File

@ -286,8 +286,8 @@ public:
constexpr span_iterator() : base_type() {} constexpr span_iterator() : base_type() {}
constexpr span_iterator(const Span* span, typename Span::index_type index) : base_type(span, index) {} constexpr span_iterator(const Span* span, typename Span::index_type index) : base_type(span, index) {}
constexpr reference operator*() const { return reinterpret_cast<reference>(base_type::operator*()); } constexpr reference operator*() const { return const_cast<reference>(base_type::operator*()); }
constexpr pointer operator->() const { return reinterpret_cast<pointer>(base_type::operator->()); } constexpr pointer operator->() const { return const_cast<pointer>(base_type::operator->()); }
constexpr span_iterator& operator++() noexcept { base_type::operator++(); return *this; } constexpr span_iterator& operator++() noexcept { base_type::operator++(); return *this; }