xtd 0.2.0
iterator.hpp
Go to the documentation of this file.
1
4#pragma once
5#include <iterator>
6#include <tuple>
7#include <type_traits>
8
10namespace xtd {
12 namespace collections {
14 namespace generic {
16 namespace helpers {
18
30 template <class input_iterator_t>
31 using iterator_value_t = typename std::iterator_traits<input_iterator_t>::value_type;
32
43 template <class input_iterator_t>
44 using iterator_key_t = std::remove_const_t<std::tuple_element_t<0, iterator_value_t<input_iterator_t>>>;
45
56 template <class input_iterator_t>
57 using iterator_mapped_t = std::tuple_element_t<1, iterator_value_t<input_iterator_t>>;
58
69 template< class input_iterator_t >
70 using iterator_to_allocator_t = std::pair<std::add_const_t<iterator_key_t<input_iterator_t>>, iterator_mapped_t<input_iterator_t>>;
72 }
73 }
74 }
75}
std::pair< std::add_const_t< iterator_key_t< input_iterator_t > >, iterator_mapped_t< input_iterator_t > > iterator_to_allocator_t
Represents the iterator to allocator type.
Definition iterator.hpp:70
std::remove_const_t< std::tuple_element_t< 0, iterator_value_t< input_iterator_t > > > iterator_key_t
Represents the key iterator type.
Definition iterator.hpp:44
typename std::iterator_traits< input_iterator_t >::value_type iterator_value_t
Represents the value iterator type.
Definition iterator.hpp:31
std::tuple_element_t< 1, iterator_value_t< input_iterator_t > > iterator_mapped_t
Represents the mapped iterator type.
Definition iterator.hpp:57
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.hpp:10