File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change 1808
1808
\rSec 2[range.dangling]{Dangling iterator handling}
1809
1809
1810
1810
\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.
1819
1820
\indexlibraryglobal {dangling}%
1820
1821
\begin {codeblock }
1821
1822
namespace std::ranges {
You can’t perform that action at this time.
0 commit comments