nothrow-input-range, nothrow-forward-range, nothrow-bidirectional-range, no-throw-input-range, nothrow-random-access-range, nothrow-sized-random-access-range
From cppreference.com
template< class R >
concept /*nothrow-input-range*/ =
ranges::range<R> &&
/*nothrow-input-iterator*/<ranges::iterator_t<R>> &&
/*nothrow-sentinel-for*/<ranges::sentinel_t<R>, ranges::iterator_t<R>>;
|
(1) | (exposition only*) |
template< class R >
concept /*nothrow-forward-range*/ =
/*nothrow-input-range*/<R> &&
/*nothrow-forward-iterator*/<ranges::iterator_t<R>>;
|
(2) | (exposition only*) |
template< class R >
concept /*nothrow-bidirectional-range*/ =
/*nothrow-forward-range*/<R> &&
/*nothrow-bidirectional-iterator*/<ranges::iterator_t<R>>;
|
(3) | (since C++26) (exposition only*) |
template< class R >
concept /*nothrow-random-access-range*/ =
/*nothrow-bidirectional-range*/<R> &&
/*nothrow-random-access-iterator*/<ranges::iterator_t<R>>;
|
(4) | (since C++26) (exposition only*) |
template< class R >
concept /*nothrow-sized-random-access-range*/ =
/*nothrow-random-access-range*/<R> && ranges::sized_range<R>;
|
(5) | (since C++26) (exposition only*) |
These exposition-only concepts specify that no exceptions are thrown from operations required by the specialized <memory> algorithms on ranges.
For the definitions of /*nothrow-input-iterator*/, /*nothrow-forward-iterator*/, /*nothrow-bidirectional-iterator*/ and /*nothrow-random-access-iterator*/, see this page.
Semantic requirements
1) A type
R models nothrow-input-range only if no exceptions are thrown from calls to ranges::begin and ranges::end on an object of type R.5) A type
R models nothrow-sized-random-access-range only if no exceptions are thrown from calls to ranges::size on an object of type R.Notes
These concepts allow some operations on ranges to throw exceptions.
See also
(C++20) |
specifies that a type is a range, that is, it provides a begin iterator and an end sentinel (concept) |
(C++20) |
specifies that a range knows its size in constant time (concept) |
(C++20)(C++23)(C++20)(C++23) |
obtains iterator and sentinel types of a range (alias template) |