Title
span does not have a const_pointer typedef
Status
new
Section
[span.overview]
Submitter
Louis Dionne

Created on 2018-07-23.00:00:00, last changed 2018-07-26.20:39:49.

Messages

Date: 2018-07-26.20:39:49

Proposed resolution:

This wording is relative to N4750.

  1. Change [span.overview], class template span synopsis, as indicated:

    namespace std {
      template<class ElementType, ptrdiff_t Extent = dynamic_extent>
      class span {
      public:
        // constants and types
        using element_type = ElementType;
        using value_type = remove_cv_t<ElementType>;
        using index_type = ptrdiff_t;
        using difference_type = ptrdiff_t;
        using pointer = element_type*;
        using const_pointer = const element_type*;
        using reference = element_type&;
        using const_reference = const element_type&;
        using iterator = implementation-defined;
        using const_iterator = implementation-defined;
        using reverse_iterator = reverse_iterator<iterator>;
        using const_reverse_iterator = reverse_iterator<const_iterator>;
        static constexpr index_type extent = Extent;
      
        […]
      };
      […]
    }
    
Date: 2018-07-23.00:00:00

std::span does not have a typedef for const_pointer and const_reference. According to Marshall Clow, this is merely an oversight.

History
Date User Action Args
2018-07-26 20:39:49adminsetmessages: + msg10010
2018-07-23 00:00:00admincreate