#include <iostream>
#include <vector>
#include <memory>
using namespace std;
struct S {
int x;
int y;
};
int main() {
std::vector<S> vec;
vec.emplace_back(1, 2);
// your code goes here
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8dmVjdG9yPgojaW5jbHVkZSA8bWVtb3J5PgoKdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCnN0cnVjdCBTIHsKICAgIGludCB4OwogICAgaW50IHk7Cn07CgppbnQgbWFpbigpIHsKCXN0ZDo6dmVjdG9yPFM+IHZlYzsKCXZlYy5lbXBsYWNlX2JhY2soMSwgMik7CgkvLyB5b3VyIGNvZGUgZ29lcyBoZXJlCglyZXR1cm4gMDsKfQ==
In file included from /usr/include/i386-linux-gnu/c++/5/bits/c++allocator.h:33:0,
from /usr/include/c++/5/bits/allocator.h:46,
from /usr/include/c++/5/string:41,
from /usr/include/c++/5/bits/locale_classes.h:40,
from /usr/include/c++/5/bits/ios_base.h:41,
from /usr/include/c++/5/ios:42,
from /usr/include/c++/5/ostream:38,
from /usr/include/c++/5/iostream:39,
from prog.cpp:1:
/usr/include/c++/5/ext/new_allocator.h: In instantiation of 'void __gnu_cxx::new_allocator<_Tp>::construct(_Up*, _Args&& ...) [with _Up = S; _Args = {int, int}; _Tp = S]':
/usr/include/c++/5/bits/alloc_traits.h:256:4: required from 'static std::_Require<typename std::allocator_traits<_Alloc>::__construct_helper<_Tp, _Args>::type> std::allocator_traits<_Alloc>::_S_construct(_Alloc&, _Tp*, _Args&& ...) [with _Tp = S; _Args = {int, int}; _Alloc = std::allocator<S>; std::_Require<typename std::allocator_traits<_Alloc>::__construct_helper<_Tp, _Args>::type> = void]'
/usr/include/c++/5/bits/alloc_traits.h:402:16: required from 'static decltype (_S_construct(__a, __p, (forward<_Args>)(std::allocator_traits::construct::__args)...)) std::allocator_traits<_Alloc>::construct(_Alloc&, _Tp*, _Args&& ...) [with _Tp = S; _Args = {int, int}; _Alloc = std::allocator<S>; decltype (_S_construct(__a, __p, (forward<_Args>)(std::allocator_traits::construct::__args)...)) = <type error>]'
/usr/include/c++/5/bits/vector.tcc:96:30: required from 'void std::vector<_Tp, _Alloc>::emplace_back(_Args&& ...) [with _Args = {int, int}; _Tp = S; _Alloc = std::allocator<S>]'
prog.cpp:14:23: required from here
/usr/include/c++/5/ext/new_allocator.h:120:4: error: new initializer expression list treated as compound expression [-fpermissive]
{ ::new((void *)__p) _Up(std::forward<_Args>(__args)...); }
^
/usr/include/c++/5/ext/new_allocator.h:120:4: error: no matching function for call to 'S::S(int)'
prog.cpp:7:8: note: candidate: S::S()
struct S {
^
prog.cpp:7:8: note: candidate expects 0 arguments, 1 provided
prog.cpp:7:8: note: candidate: constexpr S::S(const S&)
prog.cpp:7:8: note: no known conversion for argument 1 from 'int' to 'const S&'
prog.cpp:7:8: note: candidate: constexpr S::S(S&&)
prog.cpp:7:8: note: no known conversion for argument 1 from 'int' to 'S&&'