#include <iostream>
#include <type_traits>
#include <vector>
struct A
{
A() { std::cout << "Default" << std::endl; }
A(A&&) noexcept { std::cout << "Move" << std::endl; }
A(const A&) { std::cout << "Copy" << std::endl; }
};
template <typename T, typename...U>
std::vector<std::decay_t<T>> make_vector(T&& t, U&&...u)
{
std::vector<std::decay_t<T>> v;
v.emplace_back(std::forward<T>(t));
std::initializer_list<int>{(v.emplace_back(std::forward<U>(u)), 0)...};
return v;
}
int main()
{
const A a1;
A a2;
auto v = make_vector(A(), a1, std::move(a2));
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8dHlwZV90cmFpdHM+CiNpbmNsdWRlIDx2ZWN0b3I+CgpzdHJ1Y3QgQQp7CiAgQSgpIHsgc3RkOjpjb3V0IDw8ICJEZWZhdWx0IiA8PCBzdGQ6OmVuZGw7IH0KICBBKEEmJikgbm9leGNlcHQgeyBzdGQ6OmNvdXQgPDwgIk1vdmUiIDw8IHN0ZDo6ZW5kbDsgfQogIEEoY29uc3QgQSYpIHsgc3RkOjpjb3V0IDw8ICJDb3B5IiA8PCBzdGQ6OmVuZGw7IH0KfTsKCnRlbXBsYXRlIDx0eXBlbmFtZSBULCB0eXBlbmFtZS4uLlU+CnN0ZDo6dmVjdG9yPHN0ZDo6ZGVjYXlfdDxUPj4gbWFrZV92ZWN0b3IoVCYmIHQsIFUmJi4uLnUpCnsKICBzdGQ6OnZlY3RvcjxzdGQ6OmRlY2F5X3Q8VD4+IHY7CiAgdi5lbXBsYWNlX2JhY2soc3RkOjpmb3J3YXJkPFQ+KHQpKTsKICBzdGQ6OmluaXRpYWxpemVyX2xpc3Q8aW50Pnsodi5lbXBsYWNlX2JhY2soc3RkOjpmb3J3YXJkPFU+KHUpKSwgMCkuLi59OwogIHJldHVybiB2Owp9CgppbnQgbWFpbigpCnsKICAgY29uc3QgQSBhMTsKICAgQSBhMjsKICAgYXV0byB2ID0gbWFrZV92ZWN0b3IoQSgpLCBhMSwgc3RkOjptb3ZlKGEyKSk7Cn0KCgo=