std::ranges::dangling (3) - Linux Manuals
std::ranges::dangling: std::ranges::dangling
Command to display std::ranges::dangling
manual in Linux: $ man 3 std::ranges::dangling
NAME
std::ranges::dangling - std::ranges::dangling
Synopsis
Defined in header <ranges>
struct dangling; (since C++20)
dangling is a placeholder type and an empty class type, used together with the template aliases ranges::safe_iterator_t and ranges::safe_subrange_t.
When some constrain_algorithms that usually return an iterator or a subrange of a Range take a particular rvalue Range argument that does not models exposition-only concept __ForwardingRange, dangling will be returned instead to avoid returning potentially dangling results.
Member functions
std::ranges::dangling::dangling
constexpr dangling() noexcept = default; (1)
template<class... Args> (2)
constexpr dangling(Args&&...) noexcept { }
1) dangling is trivially default constructible.
2) dangling can be constructed from arguments of arbitrary number and arbitrary non-void type. The construction does not have any side-effect itself.
In other words, after replacing the type (e.g. an iterator type) in a well-formed non-aggregate initialization with dangling, the resulting initialization is also well-formed.
Example
This section is incomplete
Reason: no example
See also
obtains iterator type or subrange type of a Range which also models __ForwardingRange
safe_iterator_t (alias template)
safe_subrange_t
Pages related to std::ranges::dangling
- std::ranges::BidirectionalRange (3) - std::ranges::BidirectionalRange
- std::ranges::CommonRange (3) - std::ranges::CommonRange
- std::ranges::ContiguousRange (3) - std::ranges::ContiguousRange
- std::ranges::ForwardRange (3) - std::ranges::ForwardRange
- std::ranges::InputRange (3) - std::ranges::InputRange
- std::ranges::OutputRange (3) - std::ranges::OutputRange
- std::ranges::RandomAccessRange (3) - std::ranges::RandomAccessRange
- std::ranges::Range (3) - std::ranges::Range
- std::ranges::SizedRange,std::ranges::disable_sized_range (3) - std::ranges::SizedRange,std::ranges::disable_sized_range
- std::ranges::View,std::ranges::enable_view,std::ranges::view_base (3) - std::ranges::View,std::ranges::enable_view,std::ranges::view_base
- std::ranges::ViewableRange (3) - std::ranges::ViewableRange
- std::ranges::all_of,std::ranges::any_of,std::ranges::none_of (3) - std::ranges::all_of,std::ranges::any_of,std::ranges::none_of
- std::ranges::begin,std::ranges::cbegin (3) - std::ranges::begin,std::ranges::cbegin
- std::ranges::equal_to (3) - std::ranges::equal_to
- std::ranges::greater (3) - std::ranges::greater
- std::ranges::greater_equal (3) - std::ranges::greater_equal
- std::ranges::iterator_t,std::ranges::sentinel_t (3) - std::ranges::iterator_t,std::ranges::sentinel_t