![]() |
Arene Base
Fundamental Utilities For Safety Critical C++
|
An iterator whose i'th position yields an rvalue reference to test_value(i) of the given type.
More...

Public Types | |
| using | difference_type = std::make_signed_t<std::size_t> |
The difference type of the iterator; test_value takes std::size_t so the difference is that but signed. | |
| using | iterator_category = std::random_access_iterator_tag |
| The iterator category; random access because we just store an index and yield from it. | |
| using | pointer = T* |
| The pointer type of the iterator; basically not meaningful, and it would be ill-formed to use it. | |
| using | reference = T&& |
| The reference type of the iterator; a value of the expected type, since there's nothing to rvalue-refer to. | |
| using | value_type = T |
| The value type of the iterator; this is the type whose test values are being retrieved. | |
Public Member Functions | |
| constexpr | rvalue_iterator (difference_type index=0) noexcept(test_value_is_noexcept) |
| Construct an rvalue_iterator containing the test value with the given index (defaulting to 0) | |
| constexpr | rvalue_iterator (rvalue_iterator &&other) noexcept(std::is_nothrow_move_constructible< T >::value) |
| Move construct an rvalue_iterator. | |
| constexpr | rvalue_iterator (rvalue_iterator const &other) noexcept(test_value_is_noexcept) |
| Copy construct an rvalue_iterator, retrieving a new test value so that the value type can be move-only. | |
| ~rvalue_iterator ()=default | |
| Destroy an rvalue_iterator. | |
| constexpr auto | operator* () noexcept -> reference |
| Dereference an rvalue_iterator; data may no longer be meaningful after the first use. | |
| constexpr auto | operator+= (difference_type diff) noexcept(test_value_is_noexcept) -> rvalue_iterator & |
| Shift an rvalue_iterator by the given amount. | |
| constexpr auto | operator= (rvalue_iterator &&other) noexcept(std::is_nothrow_move_assignable< T >::value) -> rvalue_iterator & |
| Move assign an rvalue_iterator. | |
| constexpr auto | operator= (rvalue_iterator const &other) noexcept(test_value_is_noexcept) -> rvalue_iterator & |
| Copy assign an rvalue_iterator, retrieving a new test value so that the value type can be move-only. | |
Friends | |
| constexpr auto | operator- (rvalue_iterator const &left, rvalue_iterator const &right) noexcept -> difference_type |
| Get the difference between two rvalue_iterators. | |
An iterator whose i'th position yields an rvalue reference to test_value(i) of the given type.
| T | The type to yield |
| using arene::base::testing::rvalue_iterator< T >::difference_type = std::make_signed_t<std::size_t> |
The difference type of the iterator; test_value takes std::size_t so the difference is that but signed.
| using arene::base::testing::rvalue_iterator< T >::iterator_category = std::random_access_iterator_tag |
The iterator category; random access because we just store an index and yield from it.
| using arene::base::testing::rvalue_iterator< T >::pointer = T* |
The pointer type of the iterator; basically not meaningful, and it would be ill-formed to use it.
| using arene::base::testing::rvalue_iterator< T >::reference = T&& |
The reference type of the iterator; a value of the expected type, since there's nothing to rvalue-refer to.
| using arene::base::testing::rvalue_iterator< T >::value_type = T |
The value type of the iterator; this is the type whose test values are being retrieved.
|
inlineexplicitconstexprnoexcept |
Construct an rvalue_iterator containing the test value with the given index (defaulting to 0)
| index | Index to retrieve the test value with |
index >= 0, otherwise ARENE_PRECONDITION violation
|
inlineconstexprnoexcept |
Copy construct an rvalue_iterator, retrieving a new test value so that the value type can be move-only.
| other | Iterator to copy from |
|
inlineconstexprnoexcept |
Move construct an rvalue_iterator.
| other | Iterator to move from |
|
default |
Destroy an rvalue_iterator.
|
inlineconstexprnoexcept |
Dereference an rvalue_iterator; data may no longer be meaningful after the first use.
|
inlineconstexprnoexcept |
Shift an rvalue_iterator by the given amount.
| diff | Amount by which to shift the iterator |
*this current_index_ + diff >= 0, otherwise ARENE_PRECONDITION violation
|
inlineconstexprnoexcept |
Move assign an rvalue_iterator.
| other | Iterator to move from |
|
inlineconstexprnoexcept |
Copy assign an rvalue_iterator, retrieving a new test value so that the value type can be move-only.
| other | Iterator to copy from |
|
friend |
Get the difference between two rvalue_iterators.
| left | Left side of the difference |
| right | Right side of the difference |