nothrow-sentinel-for, nothrow-sized-sentinel-for
template< class S, class I > concept /*nothrow-sentinel-for*/ = std::sentinel_for<S, I>; | (1) | (exposition only*) |
template< class I >
concept /*nothrow-sized-sentinel-for*/ =
/*nothrow-sentinel-for*/<S, I> &&
std::sized_sentinel_for<S, I>;
| (2) |
(since C++26) (exposition only*) |
These exposition-only concepts specify that no exceptions are thrown from operations required by the specialized <memory> algorithms between iterators and sentinels.
Semantic requirements
1) Types
S and I model nothrow-sentinel-for only if no exceptions are thrown from copy construction, move construction, copy assignment, move assignment, or comparisons between valid values of type I and S.
2) Types
S and I model nothrow-sized-sentinel-for only if no exceptions are thrown from the - operator for valid values of type I and S.Notes
These concepts allow some sentinel_for and sized_sentinel_for operations to throw exceptions.
See also
|
(C++20) | specifies a type is a sentinel for an input_or_output_iterator type (concept) |
|
(C++20) | specifies that the - operator can be applied to an iterator and a sentinel to calculate their difference in constant time (concept) |
© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
https://en.cppreference.com/cpp/memory/ranges/nothrow_sentinel_concepts