#include <iostream>
#include <vector>
#include <algorithm>
#include <iterator>
#include <deque>
#include <functional>
#define BEGIN_TO_END(container) container.begin(), container.end()
template <template<typename...> class OutputContainerType, class InContainer>
OutputContainerType<typename InContainer::value_type, std::allocator<typename InContainer::value_type>> convertContainer(const InContainer& in)
{
OutputContainerType<typename InContainer::value_type, std::allocator<typename InContainer::value_type>> result;
std::transform(BEGIN_TO_END(in), std::back_inserter(result), [](typename InContainer::value_type value) {return value;});
return result;
}
int main() {
std::deque<int> d {1, 2, 3};
const auto v = convertContainer<std::vector>(d);
std::cout << v.size() << std::endl;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8dmVjdG9yPgojaW5jbHVkZSA8YWxnb3JpdGhtPgojaW5jbHVkZSA8aXRlcmF0b3I+CiNpbmNsdWRlIDxkZXF1ZT4KI2luY2x1ZGUgPGZ1bmN0aW9uYWw+CgojZGVmaW5lIEJFR0lOX1RPX0VORChjb250YWluZXIpIGNvbnRhaW5lci5iZWdpbigpLCBjb250YWluZXIuZW5kKCkKCnRlbXBsYXRlIDx0ZW1wbGF0ZTx0eXBlbmFtZS4uLj4gY2xhc3MgT3V0cHV0Q29udGFpbmVyVHlwZSwgY2xhc3MgSW5Db250YWluZXI+Ck91dHB1dENvbnRhaW5lclR5cGU8dHlwZW5hbWUgSW5Db250YWluZXI6OnZhbHVlX3R5cGUsIHN0ZDo6YWxsb2NhdG9yPHR5cGVuYW1lIEluQ29udGFpbmVyOjp2YWx1ZV90eXBlPj4gY29udmVydENvbnRhaW5lcihjb25zdCBJbkNvbnRhaW5lciYgaW4pCnsKICAgIE91dHB1dENvbnRhaW5lclR5cGU8dHlwZW5hbWUgSW5Db250YWluZXI6OnZhbHVlX3R5cGUsIHN0ZDo6YWxsb2NhdG9yPHR5cGVuYW1lIEluQ29udGFpbmVyOjp2YWx1ZV90eXBlPj4gcmVzdWx0OwogICAgc3RkOjp0cmFuc2Zvcm0oQkVHSU5fVE9fRU5EKGluKSwgc3Rk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