Skip to content

Commit 81a911d

Browse files
jensmaurertkoeppe
authored andcommitted
[range.dangling] Split up overly long sentence.
1 parent e429dfc commit 81a911d

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

source/ranges.tex

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1808,14 +1808,15 @@
18081808
\rSec2[range.dangling]{Dangling iterator handling}
18091809

18101810
\pnum
1811-
The tag type \tcode{dangling} is used together
1812-
with the template aliases \tcode{borrowed_iterator_t} and \tcode{borrowed_subrange_t}
1813-
to indicate that an algorithm
1814-
that typically returns an iterator into or subrange of a \tcode{range} argument
1815-
does not return an iterator or subrange
1816-
which could potentially reference a range
1817-
whose lifetime has ended for a particular rvalue \tcode{range} argument
1818-
which does not model \libconcept{borrowed_range}\iref{range.range}.
1811+
The tag type \tcode{dangling} is used together with the template aliases
1812+
\tcode{borrowed_iterator_t} and \tcode{borrowed_subrange_t}.
1813+
When an algorithm
1814+
that typically returns an iterator into, or a subrange of, a range argument
1815+
is called with an rvalue range argument
1816+
that does not model \libconcept{borrowed_range}\iref{range.range},
1817+
the return value possibly refers to a range whose lifetime has ended.
1818+
In such cases,
1819+
the tag type \tcode{dangling} is returned instead of an iterator or subrange.
18191820
\indexlibraryglobal{dangling}%
18201821
\begin{codeblock}
18211822
namespace std::ranges {

0 commit comments

Comments
 (0)