iterator_reference
namespace opentl {
template <typename It>
struct iterator_reference;
template <typename It>
using iterator_reference_t = typename iterator_reference<It>::type;
}
The reference type of an iterator.
Declared in <iterator/iterator_reference.hpp>.
Template Parameters
| Name | Description |
|---|---|
It |
The iterator type. |
Member Types
| Type | Description |
|---|---|
type |
The reference type. |
Aliases
| Name | Description |
|---|---|
iterator_reference_t |
Helper alias for iterator_reference. |
Remarks
The reference type is the one declared by the iterator as its reference member type, otherwise it is deduced from the dereference. The traits are empty when neither source is available.
Example
#include <opentl/iterator.hpp>
static_assert(opentl::same_as<opentl::iterator_reference_t<int*>, int&>);
int main() {}