blob: fb9b123a330cbbc33b8e27adb3761c61ac6119dc [file] [log] [blame]
Krzysztof Grobelnyc8e3a642020-10-23 12:29:16 +02001#pragma once
2
Szymon Dompkefdb06a12022-02-11 11:04:44 +01003#include "utils/transform.hpp"
Krzysztof Grobelnyc8e3a642020-10-23 12:29:16 +02004
5namespace utils
6{
7
Szymon Dompkefdb06a12022-02-11 11:04:44 +01008template <class R, class Container>
9auto convContainer(const Container& container)
Krzysztof Grobelnyc8e3a642020-10-23 12:29:16 +020010{
Szymon Dompkefdb06a12022-02-11 11:04:44 +010011 return transform(container, [](const auto& item) -> R { return item; });
Krzysztof Grobelnyc8e3a642020-10-23 12:29:16 +020012}
13
14} // namespace utils