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