问题 I would like to know if there is any difference the following two types of std::vector initialization in C++11 and later. std::vector<int> v1 {1, 2, 3, 4, 5}; std::vector<int> v2 = {1, 2, 3, 4, 5}; Here is a complete code example that works fine. #include <iostream> #include <vector> int main() { std::vector<int> v1 {1, 2, 3, 4, 5}; std::vector<int> v2 = {1, 2, 3, 4, 5}; std::cout << v1.size() << '\n'; std::cout << v2.size() << '\n'; } I see both initializations leading to identical results.