Main.cc: In function ‘int main()’:
Main.cc:71:47: error: use of ‘auto’ in lambda parameter declaration only available with -std=c++14 or -std=gnu++14
sort(edges.begin(), edges.end(), [](const auto& lhs, const auto& rhs) { return get<2>(lhs) < get<2>(rhs); });
^~~~
Main.cc:71:64: error: use of ‘auto’ in lambda parameter declaration only available with -std=c++14 or -std=gnu++14
sort(edges.begin(), edges.end(), [](const auto& lhs, const auto& rhs) { return get<2>(lhs) < get<2>(rhs); });
^~~~
Main.cc: In lambda function:
Main.cc:71:94: error: no matching function for call to ‘get<2>(const int&)’
sort(edges.begin(), edges.end(), [](const auto& lhs, const auto& rhs) { return get<2>(lhs) < get<2>(rhs); });
^
In file included from /usr/include/c++/7/algorithm:60:0,
from Main.cc:1:
/usr/include/c++/7/utility:225:5: note: candidate: template 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++/7/utility:225:5: note: template argument deduction/substitution failed:
Main.cc:71:94: note: mismatched types ‘std::pair<_Tp1, _Tp2>’ and ‘const int’
sort(edges.begin(), edges.end(), [](const auto& lhs, const auto& rhs) { return get<2>(lhs) < get<2>(rhs); });
^
In file included from /usr/include/c++/7/algorithm:60:0,
from Main.cc:1:
/usr/include/c++/7/utility:230:5: note: candidate: template 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++/7/utility:230:5: note: template argument deduction/substitution failed:
Main.cc:71:94: note: mismatched types ‘std::pair<_Tp1, _Tp2>’ and ‘const int’
sort(edges.begin(), edges.end(), [](const auto& lhs, const auto& rhs) { return get<2>(lhs) < get<2>(rhs); });
^
In file included from /usr/include/c++/7/algorithm:60:0,
from Main.cc:1:
/usr/include/c++/7/utility:235:5: note: candidate: template 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++/7/utility:235:5: note: template argument deduction/substitution failed:
Main.cc:71:94: note: mismatched types ‘const std::pair<_Tp1, _Tp2>’ and ‘const int’
sort(edges.begin(), edges.end(), [](const auto& lhs, const auto& rhs) { return get<2>(lhs) < get<2>(rhs); });
^
In file included from /usr/include/c++/7/tuple:39:0,
from Main.cc:4:
/usr/include/c++/7/array:307:5: note: candidate: template constexpr _Tp& std::get(std::array<_Tp, _Nm>&)
get(array<_Tp, _Nm>& __arr) noexcept
^~~
/usr/include/c++/7/array:307:5: note: template argument deduction/substitution failed:
Main.cc:71:94: note: mismatched types ‘std::array<_Tp, _Nm>’ and ‘const int’
sort(edges.begin(), edges.end(), [](const auto& lhs, const auto& rhs) { return get<2>(lhs) < get<2>(rhs); });
^
In file included from /usr/include/c++/7/tuple:39:0,
from Main.cc:4:
/usr/include/c++/7/array:316:5: note: candidate: template constexpr _Tp&& std::get(std::array<_Tp, _Nm>&&)
get(array<_Tp, _Nm>&& __arr) noexcept
^~~
/usr/include/c++/7/array:316:5: note: template argument deduction/substitution failed:
Main.cc:71:94: note: mismatched types ‘std::array<_Tp, _Nm>’ and ‘const int’
sort(edges.begin(), edges.end(), [](const auto& lhs, const auto& rhs) { return get<2>(lhs) < get<2>(rhs); });
^
In file included from /usr/include/c++/7/tuple:39:0,
from Main.cc:4:
/usr/include/c++/7/array:324:5: note: candidate: template constexpr const _Tp& std::get(const std::array<_Tp, _Nm>&)
get(const array<_Tp, _Nm>& __arr) noexcept
^~~
/usr/include/c++/7/array:324:5: note: template argument deduction/substitution failed:
Main.cc:71:94: note: mismatched types ‘const std::array<_Tp, _Nm>’ and ‘const int’
sort(edges.begin(), edges.end(), [](const auto& lhs, const auto& rhs) { return get<2>(lhs) < get<2>(rhs); });
^
In file included from Main.cc:4:0:
/usr/include/c++/7/tuple:1314:5: note: candidate: template constexpr std::__tuple_element_t<__i, std::tuple<_Elements ...> >& std::get(std::tuple<_Elements ...>&)
get(tuple<_Elements...>& __t) noexcept
^~~
/usr/include/c++/7/tuple:1314:5: note: template argument deduction/substitution failed:
Main.cc:71:94: note: mismatched types ‘std::tuple<_Elements ...>’ and ‘const int’
sort(edges.begin(), edges.end(), [](const auto& lhs, const auto& rhs) { return get<2>(lhs) < get<2>(rhs); });
^
In file included from Main.cc:4:0:
/usr/include/c++/7/tuple:1320:5: note: candidate: template constexpr std::__tuple_element_t<__i, std::tuple<_Elements ...> >& std::get(const std::tuple<_Elements ...>&)
get(const tuple<_Elements...>& __t) noexcept
^~~
/usr/include/c++/7/tuple:1320:5: note: template argument deduction/substitution failed:
Main.cc:71:94: note: mismatched types ‘const std::tuple<_Elements ...>’ and ‘const int’
sort(edges.begin(), edges.end(), [](const auto& lhs, const auto& rhs) { return get<2>(lhs) < get<2>(rhs); });
^
In file included from Main.cc:4:0:
/usr/include/c++/7/tuple:1326:5: note: candidate: template constexpr std::__tuple_element_t<__i, std::tuple<_Elements ...> >&& std::get(std::tuple<_Elements ...>&&)
get(tuple<_Elements...>&& __t) noexcept
^~~
/usr/include/c++/7/tuple:1326:5: note: template argument deduction/substitution failed:
Main.cc:71:94: note: mismatched types ‘std::tuple<_Elements ...>’ and ‘const int’
sort(edges.begin(), edges.end(), [](const auto& lhs, const auto& rhs) { return get<2>(lhs) < get<2>(rhs); });
^
Main.cc:71:108: error: no matching function for call to ‘get<2>(const int&)’
sort(edges.begin(), edges.end(), [](const auto& lhs, const auto& rhs) { return get<2>(lhs) < get<2>(rhs); });
^
In file included from /usr/include/c++/7/algorithm:60:0,
from Main.cc:1:
/usr/include/c++/7/utility:225:5: note: candidate: template 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++/7/utility:225:5: note: template argument deduction/substitution failed:
Main.cc:71:108: note: mismatched types ‘std::pair<_Tp1, _Tp2>’ and ‘const int’
sort(edges.begin(), edges.end(), [](const auto& lhs, const auto& rhs) { return get<2>(lhs) < get<2>(rhs); });
^
In file included from /usr/include/c++/7/algorithm:60:0,
from Main.cc:1:
/usr/include/c++/7/utility:230:5: note: candidate: template 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++/7/utility:230:5: note: template argument deduction/substitution failed:
Main.cc:71:108: note: mismatched types ‘std::pair<_Tp1, _Tp2>’ and ‘const int’
sort(edges.begin(), edges.end(), [](const auto& lhs, const auto& rhs) { return get<2>(lhs) < get<2>(rhs); });
^
In file included from /usr/include/c++/7/algorithm:60:0,
from Main.cc:1:
/usr/include/c++/7/utility:235:5: note: candidate: template 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++/7/utility:235:5: note: template argument deduction/substitution failed:
Main.cc:71:108: note: mismatched types ‘const std::pair<_Tp1, _Tp2>’ and ‘const int’
sort(edges.begin(), edges.end(), [](const auto& lhs, const auto& rhs) { return get<2>(lhs) < get<2>(rhs); });
^
In file included from /usr/include/c++/7/tuple:39:0,
from Main.cc:4:
/usr/include/c++/7/array:307:5: note: candidate: template constexpr _Tp& std::get(std::array<_Tp, _Nm>&)
get(array<_Tp, _Nm>& __arr) noexcept
^~~
/usr/include/c++/7/array:307:5: note: template argument deduction/substitution failed:
Main.cc:71:108: note: mismatched types ‘std::array<_Tp, _Nm>’ and ‘const int’
sort(edges.begin(), edges.end(), [](const auto& lhs, const auto& rhs) { return get<2>(lhs) < get<2>(rhs); });
^
In file included from /usr/include/c++/7/tuple:39:0,
from Main.cc:4:
/usr/include/c++/7/array:316:5: note: candidate: template constexpr _Tp&& std::get(std::array<_Tp, _Nm>&&)
get(array<_Tp, _Nm>&& __arr) noexcept
^~~
/usr/include/c++/7/array:316:5: note: template argument deduction/substitution failed:
Main.cc:71:108: note: mismatched types ‘std::array<_Tp, _Nm>’ and ‘const int’
sort(edges.begin(), edges.end(), [](const auto& lhs, const auto& rhs) { return get<2>(lhs) < get<2>(rhs); });
^
In file included from /usr/include/c++/7/tuple:39:0,
from Main.cc:4:
/usr/include/c++/7/array:324:5: note: candidate: template constexpr const _Tp& std::get(const std::array<_Tp, _Nm>&)
get(const array<_Tp, _Nm>& __arr) noexcept
^~~
/usr/include/c++/7/array:324:5: note: template argument deduction/substitution failed:
Main.cc:71:108: note: mismatched types ‘const std::array<_Tp, _Nm>’ and ‘const int’
sort(edges.begin(), edges.end(), [](const auto& lhs, const auto& rhs) { return get<2>(lhs) < get<2>(rhs); });
^
In file included from Main.cc:4:0:
/usr/include/c++/7/tuple:1314:5: note: candidate: template constexpr std::__tuple_element_t<__i, std::tuple<_Elements ...> >& std::get(std::tuple<_Elements ...>&)
get(tuple<_Elements...>& __t) noexcept
^~~
/usr/include/c++/7/tuple:1314:5: note: template argument deduction/substitution failed:
Main.cc:71:108: note: mismatched types ‘std::tuple<_Elements ...>’ and ‘const int’
sort(edges.begin(), edges.end(), [](const auto& lhs, const auto& rhs) { return get<2>(lhs) < get<2>(rhs); });
^
In file included from Main.cc:4:0:
/usr/include/c++/7/tuple:1320:5: note: candidate: template constexpr std::__tuple_element_t<__i, std::tuple<_Elements ...> >& std::get(const std::tuple<_Elements ...>&)
get(const tuple<_Elements...>& __t) noexcept
^~~
/usr/include/c++/7/tuple:1320:5: note: template argument deduction/substitution failed:
Main.cc:71:108: note: mismatched types ‘const std::tuple<_Elements ...>’ and ‘const int’
sort(edges.begin(), edges.end(), [](const auto& lhs, const auto& rhs) { return get<2>(lhs) < get<2>(rhs); });
^
In file included from Main.cc:4:0:
/usr/include/c++/7/tuple:1326:5: note: candidate: template constexpr std::__tuple_element_t<__i, std::tuple<_Elements ...> >&& std::get(std::tuple<_Elements ...>&&)
get(tuple<_Elements...>&& __t) noexcept
^~~
/usr/include/c++/7/tuple:1326:5: note: template argument deduction/substitution failed:
Main.cc:71:108: note: mismatched types ‘std::tuple<_Elements ...>’ and ‘const int’
sort(edges.begin(), edges.end(), [](const auto& lhs, const auto& rhs) { return get<2>(lhs) < get<2>(rhs); });
^
In file included from /usr/include/c++/7/bits/stl_algobase.h:71:0,
from /usr/include/c++/7/algorithm:61,
from Main.cc:1:
/usr/include/c++/7/bits/predefined_ops.h: In instantiation of ‘bool __gnu_cxx::__ops::_Iter_comp_iter<_Compare>::operator()(_Iterator1, _Iterator2) [with _Iterator1 = __gnu_cxx::__normal_iterator*, std::vector > >; _Iterator2 = __gnu_cxx::__normal_iterator*, std::vector > >; _Compare = main()::]’:
/usr/include/c++/7/bits/stl_algo.h:1847:14: required from ‘void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator*, std::vector > >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter >]’
/usr/include/c++/7/bits/stl_algo.h:1885:25: required from ‘void std::__final_insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator*, std::vector > >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter >]’
/usr/include/c++/7/bits/stl_algo.h:1971:31: required from ‘void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator*, std::vector > >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter >]’
/usr/include/c++/7/bits/stl_algo.h:4868:18: required from ‘void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = __gnu_cxx::__normal_iterator*, std::vector > >; _Compare = main()::]’
Main.cc:71:112: required from here
/usr/include/c++/7/bits/predefined_ops.h:143:18: error: no match for call to ‘(main()::) (std::tuple&, std::tuple&)’
{ return bool(_M_comp(*__it1, *__it2)); }
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/7/bits/predefined_ops.h:143:18: note: candidate: void (*)(const int&, const int&)
/usr/include/c++/7/bits/predefined_ops.h:143:18: note: candidate expects 3 arguments, 3 provided
Main.cc:71:73: note: candidate: main()::
sort(edges.begin(), edges.end(), [](const auto& lhs, const auto& rhs) { return get<2>(lhs) < get<2>(rhs); });
^
Main.cc:71:73: note: no known conversion for argument 1 from ‘std::tuple’ to ‘const int&’
In file included from /usr/include/c++/7/bits/stl_algobase.h:71:0,
from /usr/include/c++/7/algorithm:61,
from Main.cc:1:
/usr/include/c++/7/bits/predefined_ops.h: In instantiation of ‘bool __gnu_cxx::__ops::_Val_comp_iter<_Compare>::operator()(_Value&, _Iterator) [with _Value = std::tuple; _Iterator = __gnu_cxx::__normal_iterator*, std::vector > >; _Compare = main()::]’:
/usr/include/c++/7/bits/stl_algo.h:1828:20: required from ‘void std::__unguarded_linear_insert(_RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator*, std::vector > >; _Compare = __gnu_cxx::__ops::_Val_comp_iter >]’
/usr/include/c++/7/bits/stl_algo.h:1855:36: required from ‘void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator*, std::vector > >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter >]’
/usr/include/c++/7/bits/stl_algo.h:1885:25: required from ‘void std::__final_insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator*, std::vector > >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter >]’
/usr/include/c++/7/bits/stl_algo.h:1971:31: required from ‘void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator*, std::vector > >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter >]’
/usr/include/c++/7/bits/stl_algo.h:4868:18: required from ‘void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = __gnu_cxx::__normal_iterator*, std::vector > >; _Compare = main()::]’
Main.cc:71:112: required from here
/usr/include/c++/7/bits/predefined_ops.h:215:11: error: no match for call to ‘(main()::) (std::tuple&, std::tuple&)’
{ return bool(_M_comp(__val, *__it)); }
^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/7/bits/predefined_ops.h:215:11: note: candidate: void (*)(const int&, const int&)
/usr/include/c++/7/bits/predefined_ops.h:215:11: note: candidate expects 3 arguments, 3 provided
Main.cc:71:73: note: candidate: main()::
sort(edges.begin(), edges.end(), [](const auto& lhs, const auto& rhs) { return get<2>(lhs) < get<2>(rhs); });
^
Main.cc:71:73: note: no known conversion for argument 1 from ‘std::tuple’ to ‘const int&’
In file included from /usr/include/c++/7/bits/stl_algobase.h:71:0,
from /usr/include/c++/7/algorithm:61,
from Main.cc:1:
/usr/include/c++/7/bits/predefined_ops.h: In instantiation of ‘bool __gnu_cxx::__ops::_Iter_comp_val<_Compare>::operator()(_Iterator, _Value&) [with _Iterator = __gnu_cxx::__normal_iterator*, std::vector > >; _Value = std::tuple; _Compare = main()::]’:
/usr/include/c++/7/bits/stl_heap.h:133:48: required from ‘void std::__push_heap(_RandomAccessIterator, _Distance, _Distance, _Tp, _Compare&) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator*, std::vector > >; _Distance = long int; _Tp = std::tuple; _Compare = __gnu_cxx::__ops::_Iter_comp_val >]’
/usr/include/c++/7/bits/stl_heap.h:237:23: required from ‘void std::__adjust_heap(_RandomAccessIterator, _Distance, _Distance, _Tp, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator*, std::vector > >; _Distance = long int; _Tp = std::tuple; _Compare = __gnu_cxx::__ops::_Iter_comp_iter >]’
/usr/include/c++/7/bits/stl_heap.h:342:22: required from ‘void std::__make_heap(_RandomAccessIterator, _RandomAccessIterator, _Compare&) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator*, std::vector > >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter >]’
/usr/include/c++/7/bits/stl_algo.h:1672:23: required from ‘void std::__heap_select(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator*, std::vector > >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter >]’
/usr/include/c++/7/bits/stl_algo.h:1933:25: required from ‘void std::__partial_sort(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator*, std::vector > >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter >]’
/usr/include/c++/7/bits/stl_algo.h:1948:27: required from ‘void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator*, std::vector > >; _Size = long int; _Compare = __gnu_cxx::__ops::_Iter_comp_iter >]’
/usr/include/c++/7/bits/stl_algo.h:1968:25: required from ‘void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator*, std::vector > >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter >]’
/usr/include/c++/7/bits/stl_algo.h:4868:18: required from ‘void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = __gnu_cxx::__normal_iterator*, std::vector > >; _Compare = main()::]’
Main.cc:71:112: required from here
/usr/include/c++/7/bits/predefined_ops.h:177:11: error: no match for call to ‘(main()::) (std::tuple&, std::tuple&)’
{ return bool(_M_comp(*__it, __val)); }
^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/7/bits/predefined_ops.h:177:11: note: candidate: void (*)(const int&, const int&)
/usr/include/c++/7/bits/predefined_ops.h:177:11: note: candidate expects 3 arguments, 3 provided
Main.cc:71:73: note: candidate: main()::
sort(edges.begin(), edges.end(), [](const auto& lhs, const auto& rhs) { return get<2>(lhs) < get<2>(rhs); });
^
Main.cc:71:73: note: no known conversion for argument 1 from ‘std::tuple’ to ‘const int&’