9#include <boost/iterator/transform_iterator.hpp>
15 template <
typename It>
17 using first_value_type =
typename It::value_type::first_type;
18 using decay_first_value_type =
typename std::remove_cv_t<typename std::remove_reference_t<first_value_type>>;
19 using ref_to_first = decay_first_value_type &;
20 return boost::make_transform_iterator(it, [](
auto &pair) -> ref_to_first {
return pair.first; });
24 template <
typename It>
26 using first_value_type =
typename It::value_type::first_type;
27 using decay_first_value_type =
typename std::remove_cv_t<typename std::remove_reference_t<first_value_type>>;
28 using const_ref_to_first =
const decay_first_value_type &;
29 return boost::make_transform_iterator(it, [](
const auto &pair) -> const_ref_to_first {
return pair.first; });
33 template <
typename It>
35 using second_value_type =
typename It::value_type::second_type;
36 using decay_second_value_type =
typename std::remove_cv_t<typename std::remove_reference_t<second_value_type>>;
37 using ref_to_second = decay_second_value_type &;
38 return boost::make_transform_iterator(it, [](
auto &pair) -> ref_to_second {
return pair.second; });
42 template <
typename It>
44 using second_value_type =
typename It::value_type::second_type;
45 using decay_second_value_type =
typename std::remove_cv_t<typename std::remove_reference_t<second_value_type>>;
46 using const_ref_to_second =
const decay_second_value_type &;
47 return boost::make_transform_iterator(it, [](
const auto &pair) -> const_ref_to_second {
return pair.second; });
static auto make_map_keys_const_iterator(It it)
Creates an iterator over const references to the keys of a map.
static auto make_map_values_iterator(It it)
Creates an iterator over non-const references to the values of a map.
static auto make_map_keys_iterator(It it)
Creates an iterator over non-const references to the keys of a map.
static auto make_map_values_const_iterator(It it)
Creates an iterator over const references to the values of a map.
This file contains definitions of common data structures used in traffic manager.