#include <vector>
#include <memory>
template<class T>
std::vector<T> make_vector(){
std::vector<T> v;
// ...
return v;
}
template<class T, class Alloc>
std::vector<T, Alloc> make_vector(Alloc const& al = Alloc()){
std::vector<T, Alloc> v(al);
// ...
return v;
}
int main(){
auto v1 = make_vector<int>();
auto v2 = make_vector<int, std::allocator<int>>();
std::allocator<int> al;
auto v3 = make_vector<int, std::allocator<int>>(al);
}
I2luY2x1ZGUgPHZlY3Rvcj4KI2luY2x1ZGUgPG1lbW9yeT4KCnRlbXBsYXRlPGNsYXNzIFQ+CnN0ZDo6dmVjdG9yPFQ+IG1ha2VfdmVjdG9yKCl7CiAgc3RkOjp2ZWN0b3I8VD4gdjsKICAvLyAuLi4KICByZXR1cm4gdjsKfQoKdGVtcGxhdGU8Y2xhc3MgVCwgY2xhc3MgQWxsb2M+CnN0ZDo6dmVjdG9yPFQsIEFsbG9jPiBtYWtlX3ZlY3RvcihBbGxvYyBjb25zdCYgYWwgPSBBbGxvYygpKXsKICBzdGQ6OnZlY3RvcjxULCBBbGxvYz4gdihhbCk7CiAgLy8gLi4uCiAgcmV0dXJuIHY7Cn0KCmludCBtYWluKCl7CiAgYXV0byB2MSA9IG1ha2VfdmVjdG9yPGludD4oKTsKICBhdXRvIHYyID0gbWFrZV92ZWN0b3I8aW50LCBzdGQ6OmFsbG9jYXRvcjxpbnQ+PigpOwogIHN0ZDo6YWxsb2NhdG9yPGludD4gYWw7CiAgYXV0byB2MyA9IG1ha2VfdmVjdG9yPGludCwgc3RkOjphbGxvY2F0b3I8aW50Pj4oYWwpOwp9