Borderou de evaluare (job #1894430)

Utilizator cesarkawakamiCesar Kawakami cesarkawakami Data 26 februarie 2017 20:28:01
Problema Strabunica Status done
Runda Arhiva de probleme Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp: In function ‘int main()’: user.cpp:47:27: error: no matching function for call to ‘Elem::Elem(<brace-enclosed initializer list>)’ v.push_back(Elem{i}); ^ user.cpp:47:27: note: candidates are: user.cpp:4:8: note: constexpr Elem::Elem() struct Elem { ^ user.cpp:4:8: note: candidate expects 0 arguments, 1 provided user.cpp:4:8: note: constexpr Elem::Elem(const Elem&) user.cpp:4:8: note: no known conversion for argument 1 from ‘int’ to ‘const Elem&’ user.cpp:4:8: note: constexpr Elem::Elem(Elem&&) user.cpp:4:8: note: no known conversion for argument 1 from ‘int’ to ‘Elem&&’ user.cpp: In instantiation of ‘void annotate(It, It, CPtr) [with It = __gnu_cxx::__normal_iterator<Elem*, std::vector<Elem> >; CPtr = int Elem::*]’: user.cpp:49:43: required from here user.cpp:19:5: error: no matching function for call to ‘std::vector<Mem>::push_back(<brace-enclosed initializer list>)’ v.push_back({b++->value, 0}); ^ user.cpp:19:5: note: candidates are: In file included from /usr/include/c++/4.8/vector:64:0, from user.cpp:2: /usr/include/c++/4.8/bits/stl_vector.h:901:7: note: void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = Mem; _Alloc = std::allocator<Mem>; std::vector<_Tp, _Alloc>::value_type = Mem] push_back(const value_type& __x) ^ /usr/include/c++/4.8/bits/stl_vector.h:901:7: note: no known conversion for argument 1 from ‘<brace-enclosed initializer list>’ to ‘const value_type& {aka const Mem&}’ /usr/include/c++/4.8/bits/stl_vector.h:919:7: note: void std::vector<_Tp, _Alloc>::push_back(std::vector<_Tp, _Alloc>::value_type&&) [with _Tp = Mem; _Alloc = std::allocator<Mem>; std::vector<_Tp, _Alloc>::value_type = Mem] push_back(value_type&& __x) ^ /usr/include/c++/4.8/bits/stl_vector.h:919:7: note: no known conversion for argument 1 from ‘<brace-enclosed initializer list>’ to ‘std::vector<Mem>::value_type&& {aka Mem&&}’ user.cpp:36:9: error: no matching function for call to ‘std::vector<Mem>::push_back(<brace-enclosed initializer list>)’ v.push_back({b++->value, i++}); ^ user.cpp:36:9: note: candidates are: In file included from /usr/include/c++/4.8/vector:64:0, from user.cpp:2: /usr/include/c++/4.8/bits/stl_vector.h:901:7: note: void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = Mem; _Alloc = std::allocator<Mem>; std::vector<_Tp, _Alloc>::value_type = Mem] push_back(const value_type& __x) ^ /usr/include/c++/4.8/bits/stl_vector.h:901:7: note: no known conversion for argument 1 from ‘<brace-enclosed initializer list>’ to ‘const value_type& {aka const Mem&}’ /usr/include/c++/4.8/bits/stl_vector.h:919:7: note: void std::vector<_Tp, _Alloc>::push_back(std::vector<_Tp, _Alloc>::value_type&&) [with _Tp = Mem; _Alloc = std::allocator<Mem>; std::vector<_Tp, _Alloc>::value_type = Mem] push_back(value_type&& __x) ^ /usr/include/c++/4.8/bits/stl_vector.h:919:7: note: no known conversion for argument 1 from ‘<brace-enclosed initializer list>’ to ‘std::vector<Mem>::value_type&& {aka Mem&&}’ user.cpp: In instantiation of ‘void annotate(It, It, CPtr) [with It = std::reverse_iterator<__gnu_cxx::__normal_iterator<Elem*, std::vector<Elem> > >; CPtr = int Elem::*]’: user.cpp:50:45: required from here user.cpp:19:5: error: no matching function for call to ‘std::vector<Mem>::push_back(<brace-enclosed initializer list>)’ v.push_back({b++->value, 0}); ^ user.cpp:19:5: note: candidates are: In file included from /usr/include/c++/4.8/vector:64:0,

Ceva nu functioneaza?