iterate_keys.h 263 B

12345678910111213
  1. #pragma once
  2. #include "mapped.h"
  3. template<typename TMapping>
  4. auto IterateKeys(TMapping&& map) {
  5. return ::MakeMappedRange(
  6. std::forward<TMapping>(map),
  7. [](const auto& x) -> decltype((x.first)) {
  8. return x.first;
  9. }
  10. );
  11. }