Borderou de evaluare (job #2197419)

Utilizator emanuel_rRamneantu Emanuel emanuel_r Data 22 aprilie 2018 01:22:44
Problema Arbore partial de cost minim Status done
Runda Arhiva educationala Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp: In member function ‘void MST::build()’: user.cpp:54:37: error: use of ‘auto’ in lambda parameter declaration only available with -std=c++14 or -std=gnu++14 sort(E.begin(), E.end(), [](auto t1, auto t2) -> bool {return get<2>(t1) < get<2>(t2);}); ^~~~ user.cpp:54:46: error: use of ‘auto’ in lambda parameter declaration only available with -std=c++14 or -std=gnu++14 sort(E.begin(), E.end(), [](auto t1, auto t2) -> bool {return get<2>(t1) < get<2>(t2);}); ^~~~ user.cpp: In lambda function: user.cpp:54:80: error: no matching function for call to ‘get(int&)’ sort(E.begin(), E.end(), [](auto t1, auto t2) -> bool {return get<2>(t1) < get<2>(t2);}); ^ In file included from /usr/include/c++/6/algorithm:60:0, from /usr/include/x86_64-linux-gnu/c++/6/32/bits/stdc++.h:65, from user.cpp:1: /usr/include/c++/6/utility:202:5: note: candidate: template<unsigned int _Int, class _Tp1, class _Tp2> constexpr typename std::tuple_element<_Int, std::pair<_Tp1, _Tp2> >::type& std::get(std::pair<_Tp1, _Tp2>&) get(std::pair<_Tp1, _Tp2>& __in) noexcept ^~~ /usr/include/c++/6/utility:202:5: note: template argument deduction/substitution failed: user.cpp:54:80: note: mismatched types ‘std::pair<_Tp1, _Tp2>’ and ‘int’ sort(E.begin(), E.end(), [](auto t1, auto t2) -> bool {return get<2>(t1) < get<2>(t2);}); ^ In file included from /usr/include/c++/6/algorithm:60:0, from /usr/include/x86_64-linux-gnu/c++/6/32/bits/stdc++.h:65, from user.cpp:1: /usr/include/c++/6/utility:207:5: note: candidate: template<unsigned int _Int, class _Tp1, class _Tp2> constexpr typename std::tuple_element<_Int, std::pair<_Tp1, _Tp2> >::type&& std::get(std::pair<_Tp1, _Tp2>&&) get(std::pair<_Tp1, _Tp2>&& __in) noexcept ^~~ /usr/include/c++/6/utility:207:5: note: template argument deduction/substitution failed: user.cpp:54:80: note: mismatched types ‘std::pair<_Tp1, _Tp2>’ and ‘int’ sort(E.begin(), E.end(), [](auto t1, auto t2) -> bool {return get<2>(t1) < get<2>(t2);}); ^ In file included from /usr/include/c++/6/algorithm:60:0, from /usr/include/x86_64-linux-gnu/c++/6/32/bits/stdc++.h:65, from user.cpp:1: /usr/include/c++/6/utility:212:5: note: candidate: template<unsigned int _Int, class _Tp1, class _Tp2> constexpr const typename std::tuple_element<_Int, std::pair<_Tp1, _Tp2> >::type& std::get(const std::pair<_Tp1, _Tp2>&) get(const std::pair<_Tp1, _Tp2>& __in) noexcept ^~~ /usr/include/c++/6/utility:212:5: note: template argument deduction/substitution failed: user.cpp:54:80: note: mismatched types ‘const std::pair<_Tp1, _Tp2>’ and ‘int’ sort(E.begin(), E.end(), [](auto t1, auto t2) -> bool {return get<2>(t1) < get<2>(t2);}); ^ In file included from /usr/include/c++/6/tuple:39:0, from /usr/include/c++/6/functional:55, from /usr/include/x86_64-linux-gnu/c++/6/32/bits/stdc++.h:71, from user.cpp:1: /usr/include/c++/6/array:281:5: note: candidate: template<unsigned int _Int, class _Tp, unsigned int _Nm> constexpr _Tp& std::get(std::array<_Tp, _Nm>&) get(array<_Tp, _Nm>& __arr) noexcept ^~~ /usr/include/c++/6/array:281:5: note: template argument deduction/substitution failed: user.cpp:54:80: note: mismatched types ‘std::array<_Tp, _Nm>’ and ‘int’

Ceva nu functioneaza?