std::experimental::ranges::dangling, std::experimental::ranges::safe_iterator_t
| Technical Specification | ||||
| Filesystem library (filesystem TS) | ||||
| Library fundamentals (library fundamentals TS) | ||||
| Library fundamentals 2 (library fundamentals TS v2) | ||||
| Library fundamentals 3 (library fundamentals TS v3) | ||||
| Extensions for parallelism (parallelism TS) | ||||
| Extensions for parallelism 2 (parallelism TS v2) | ||||
| Extensions for concurrency (concurrency TS) | ||||
| Extensions for concurrency 2 (concurrency TS v2) | ||||
| Concepts (concepts TS) | ||||
| Ranges (ranges TS) | ||||
| Reflection (reflection TS) | ||||
| Mathematical special functions (special functions TR) | ||||
| Experimental Non-TS | ||||
| Pattern Matching | ||||
| Linear Algebra | ||||
| std::execution | ||||
| Contracts | ||||
| 2D Graphics |
| Iterator concepts | |||||||||||||
| Indirect callable concepts | |||||||||||||
| Common algorithm requirements | |||||||||||||
| Concept utilities | |||||||||||||
| Iterator utilities and operations | |||||||||||||
| Iterator traits | |||||||||||||
| Iterator adaptors | |||||||||||||
| |||||||||||||
| Stream iterators | |||||||||||||
| Defined in header <experimental/ranges/iterator>
|
||
| template< CopyConstructible T > class dangling { |
(ranges TS) | |
| template< Range R > using safe_iterator_t = std::conditional_t<std::is_lvalue_reference<R>::value, |
(ranges TS) | |
The class template dangling is a simple wrapper around an object to indicate that the wrapped object may be dangling, that is, it refers to another object whose lifetime may have ended.
The alias template safe_iterator_t returns the iterator type of R, wrapped in dangling if the range was an rvalue range (as indicated by R not being an lvalue reference type).
They are used by range algorithms that accept rvalue ranges and return iterators into them.
[edit] Member functions
std::experimental::ranges::dangling::dangling
| dangling() requires DefaultConstructible<T>(); |
(1) | |
| dangling(T t); |
(2) | |
t. Note that this constructor defines an implicit conversion from T to dangling<T>.
std::experimental::ranges::dangling::get_unsafe
| T get_unsafe() const; |
|
Returns a copy of the wrapped object.