class MyClass { public: MyClass(int x) {} }; int main() { vector<MyClass> v; MyClass test{1}; v.push_back(test); }