// All features available in C++14
#include "vccc/ranges.hpp"
// Deduced as std::vector<int>
auto v = vccc::views::iota(10)
| vccc::views::take(4)
| vccc::ranges::to<std::vector>();
std::pair<int, std::string> parr[] = {{1: "one"}, {2: "two"}};
// Deduced as std::map<int, std::string>
auto m = vccc::ranges::to<std::map>(parr);
// Deduced to std::vector<std::pair<int, std::string>>
auto pv = vccc::ranges::to<std::vector>(parr);
auto arr = {'A', 'B', 'C', 'D'};
auto m = v | vccc::views::enumerate | vccc::ranges::to<std::map>();
#if __cplusplus < 201703L
for (const auto kv : m)
std::cout << '[' << std::get<0>(kv) << "]:" << std::get<1>(kv) << ' ';
#else
for (auto const [key, value] : m)
std::cout << '[' << key << "]:" << value << ' ';
#endif