From 0c1b6717c12477cbf9f744e3b011ae1711256e69 Mon Sep 17 00:00:00 2001 From: Neil MacIntosh Date: Wed, 20 Jul 2016 08:52:09 -0700 Subject: [PATCH] Weakened cast in span::iterator. --- include/span.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/span.h b/include/span.h index 6fe3bff..fbed6f7 100644 --- a/include/span.h +++ b/include/span.h @@ -286,8 +286,8 @@ public: constexpr span_iterator() : base_type() {} constexpr span_iterator(const Span* span, typename Span::index_type index) : base_type(span, index) {} - constexpr reference operator*() const { return reinterpret_cast(base_type::operator*()); } - constexpr pointer operator->() const { return reinterpret_cast(base_type::operator->()); } + constexpr reference operator*() const { return const_cast(base_type::operator*()); } + constexpr pointer operator->() const { return const_cast(base_type::operator->()); } constexpr span_iterator& operator++() noexcept { base_type::operator++(); return *this; }