You can safely use this syntax:
std::vector v = std::vector(2);
Alternatively, use brace initialization, but you must be careful: the std::initializer_list constructor will be picked, so to initialize a vector with two value- (therefore zero-) initialized ints you need
std::vector v{0, 0};