9 Iterators library [iterators]

9.7 Iterator adaptors [iterators.predef]

9.7.7 Dangling wrapper [dangling.wrappers] Class template dangling [dangling.wrap]

Class template dangling is a wrapper for an object that refers to another object whose lifetime may have ended. It is used by algorithms that accept rvalue ranges and return iterators.

namespace std { namespace experimental { namespace ranges { inline namespace v1 {
  template <CopyConstructible T>
  class dangling {
    constexpr dangling() requires DefaultConstructible<T>;
    constexpr dangling(T t);
    constexpr T get_unsafe() const;
    T value; // exposition only

  template <Range R>
  using safe_iterator_t =
}}}} dangling operations [dangling.wrap.ops] dangling constructors [dangling.wrap.op.const]

constexpr dangling() requires DefaultConstructible<T>;

Effects: Constructs a dangling, value-initializing value.

constexpr dangling(T t);

Effects: Constructs a dangling, initializing value with t. dangling::get_unsafe [dangling.wrap.op.get]

constexpr T get_unsafe() const;

Returns: value.