std::unreachable_sentinel_t, std::unreachable_sentinel - cppreference.com (original) (raw)
Defined in header | ||
---|---|---|
struct unreachable_sentinel_t; | (1) | (since C++20) |
inline constexpr unreachable_sentinel_t unreachable_sentinel{}; | (2) | (since C++20) |
unreachable_sentinel_t
is an empty class type that can be used to denote the “upper bound” of an unbounded interval.unreachable_sentinel
is a constant of typeunreachable_sentinel_t
.
Contents
[edit] Non-member functions
| | compares an unreachable_sentinel_t with a value of any weakly_incrementable type (function template) | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
operator==(std::unreachable_sentinel_t)
| template< std::weakly_incrementable I > friend constexpr bool operator==( unreachable_sentinel_t, const I& ) noexcept { return false; } | | (since C++20) | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ------------- |
unreachable_sentinel_t
can be compared with any weakly_incrementable type and the result is always false.
This function template is not visible to ordinary unqualified or qualified lookup, and can only be found by argument-dependent lookup when std::unreachable_sentinel_t
is an associated class of the arguments.