Skip to content

Commit e0d78d3

Browse files
Alisdair Meredithtkoeppe
authored andcommitted
[span.overview] Fix reverse_iterator for span (#2112)
There is a common convention to omit 'std::' when not strictly needed, other than for 'std::move' and 'std::forward'. A third case is for 'reverse_iterator' and 'const_reverse_iterator' type aliases inside a class definition, as the leading 'reverse_iterator' type alias hides the 'std' version from the 'const_reverse_iterator' definition, and subsequently fails to compile. This patch restore the class definition to a safely copy/pastable state. An additional review indicated this convention has been applied correctly for every othert potential occurrence in the library.
1 parent 33e8e2b commit e0d78d3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

source/containers.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9839,8 +9839,8 @@
98399839
using reference = element_type&;
98409840
using iterator = @\impdefx{type of \tcode{span::iterator}}@;
98419841
using const_iterator = @\impdefx{type of \tcode{span::const_iterator}}@;
9842-
using reverse_iterator = reverse_iterator<iterator>;
9843-
using const_reverse_iterator = reverse_iterator<const_iterator>;
9842+
using reverse_iterator = std::reverse_iterator<iterator>;
9843+
using const_reverse_iterator = std::reverse_iterator<const_iterator>;
98449844
static constexpr index_type extent = Extent;
98459845

98469846
// \ref{span.cons}, constructors, copy, and assignment

0 commit comments

Comments
 (0)