aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/iterator/iterate_values.h
blob: ac6f2f04cedb5bf10551d011ff129f9cdddee436 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
#pragma once

#include "mapped.h"

template<typename TMapping>
auto IterateValues(TMapping&& map) {
    return ::MakeMappedRange(
        std::forward<TMapping>(map),
        [](auto& x) -> decltype((x.second)) {
            return x.second;
        }
    );
}