Skip to content

Commit 5149fdf

Browse files
authored
Merge 2019-11 LWG Motion 16
P1870R1 forwarding-range<T> is too subtle
2 parents ef59f55 + bceff41 commit 5149fdf

File tree

4 files changed

+155
-94
lines changed

4 files changed

+155
-94
lines changed

papers/nxxxx.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,20 @@ and after consulting the paper authors and the LWG chair,
6363
the corresponding changes were also applied to
6464
the additional range adaptors listed above.
6565

66+
### LWG motion 16
67+
68+
This paper removed the exposition-only concept *`range-impl`*,
69+
inlining it into its only remaining user, the `range` concept.
70+
However, two uses of *`range-impl`* were left behind.
71+
These have been updated and suitably adjusted
72+
to refer to `range` instead.
73+
74+
LWG motion 13 ([P1394R4](http://wg21.link/p1394r4))
75+
added a couple of new uses of
76+
the exposition-only concept *`forwarding-range`*,
77+
which was removed by this paper.
78+
These uses have been replaced with `safe_range`.
79+
6680
## Feature test macros
6781

6882
The feature test macro `__cpp_nontype_template_parameter_class` has been removed

source/containers.tex

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10513,6 +10513,9 @@
1051310513
template<class ElementType, size_t Extent = dynamic_extent>
1051410514
class span;
1051510515

10516+
template<class ElementType, size_t Extent>
10517+
inline constexpr bool enable_safe_range<span<ElementType, Extent>> = true;
10518+
1051610519
// \ref{span.objectrep}, views of object representation
1051710520
template<class ElementType, size_t Extent>
1051810521
span<const byte, Extent == dynamic_extent ? dynamic_extent : sizeof(ElementType) * Extent>
@@ -10625,9 +10628,6 @@
1062510628
constexpr const_reverse_iterator crbegin() const noexcept;
1062610629
constexpr const_reverse_iterator crend() const noexcept;
1062710630

10628-
friend constexpr iterator begin(span s) noexcept { return s.begin(); }
10629-
friend constexpr iterator end(span s) noexcept { return s.end(); }
10630-
1063110631
private:
1063210632
pointer data_; // \expos
1063310633
size_type size_; // \expos
@@ -10786,7 +10786,7 @@
1078610786
\item \tcode{extent == dynamic_extent} is \tcode{true}.
1078710787
\item \tcode{R} satisfies \tcode{ranges::\libconcept{contiguous_range}} and
1078810788
\tcode{ranges::\libconcept{sized_range}}.
10789-
\item Either \tcode{R} satisfies \exposconcept{forwarding-range} or
10789+
\item Either \tcode{R} satisfies \libconcept{safe_range} or
1079010790
\tcode{is_const_v<element_type>} is \tcode{true}.
1079110791
\item \tcode{remove_cvref_t<R>} is not a specialization of \tcode{span}.
1079210792
\item \tcode{remove_cvref_t<R>} is not a specialization of \tcode{array}.
@@ -10805,7 +10805,7 @@
1080510805
\item \tcode{R} models \tcode{ranges::\libconcept{contiguous_range}} and
1080610806
\tcode{ranges::\libconcept{sized_range}}.
1080710807
\item If \tcode{is_const_v<element_type>} is \tcode{false},
10808-
\tcode{R} models \exposconcept{forwarding-range}.
10808+
\tcode{R} models \libconcept{safe_range}.
1080910809
\end{itemize}
1081010810

1081110811
\pnum

0 commit comments

Comments
 (0)