diff --git a/gsl/span b/gsl/span index 6d6992d..aec826a 100644 --- a/gsl/span +++ b/gsl/span @@ -140,15 +140,15 @@ namespace details template class span_iterator { + using element_type_ = typename Span::element_type; public: using iterator_category = std::random_access_iterator_tag; - using value_type = - std::conditional_t, - typename Span::element_type>; + using value_type = std::remove_const_t; using difference_type = typename Span::index_type; - using pointer = std::add_pointer_t; - using reference = std::add_lvalue_reference_t; + using reference = + std::conditional_t &; + using pointer = std::add_pointer_t; constexpr span_iterator() noexcept : span_iterator(nullptr, 0) {}