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

#include "mapped.h"

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