运行 ID: 42113

Main.cc: In function ‘int main()’:
Main.cc:61:16: warning: decomposition declaration only available with -std=c++1z or -std=gnu++1z
     for (auto& [l, r] : segs)
                ^
Main.cc:63:39: error: use of ‘auto’ in lambda parameter declaration only available with -std=c++14 or -std=gnu++14
     sort(segs.begin(), segs.end(), [](auto lhs, auto rhs) { return make_pair(lhs.second, lhs.first) < make_pair(rhs.second, rhs.first); });
                                       ^~~~
Main.cc:63:49: error: use of ‘auto’ in lambda parameter declaration only available with -std=c++14 or -std=gnu++14
     sort(segs.begin(), segs.end(), [](auto lhs, auto rhs) { return make_pair(lhs.second, lhs.first) < make_pair(rhs.second, rhs.first); });
                                                 ^~~~
Main.cc: In lambda function:
Main.cc:63:82: error: request for member ‘second’ in ‘lhs’, which is of non-class type ‘int’
     sort(segs.begin(), segs.end(), [](auto lhs, auto rhs) { return make_pair(lhs.second, lhs.first) < make_pair(rhs.second, rhs.first); });
                                                                                  ^~~~~~
Main.cc:63:94: error: request for member ‘first’ in ‘lhs’, which is of non-class type ‘int’
     sort(segs.begin(), segs.end(), [](auto lhs, auto rhs) { return make_pair(lhs.second, lhs.first) < make_pair(rhs.second, rhs.first); });
                                                                                              ^~~~~
Main.cc:63:117: error: request for member ‘second’ in ‘rhs’, which is of non-class type ‘int’
     sort(segs.begin(), segs.end(), [](auto lhs, auto rhs) { return make_pair(lhs.second, lhs.first) < make_pair(rhs.second, rhs.first); });
                                                                                                                     ^~~~~~
Main.cc:63:129: error: request for member ‘first’ in ‘rhs’, which is of non-class type ‘int’
     sort(segs.begin(), segs.end(), [](auto lhs, auto rhs) { return make_pair(lhs.second, lhs.first) < make_pair(rhs.second, rhs.first); });
                                                                                                                                 ^~~~~
Main.cc: In function ‘int main()’:
Main.cc:66:15: warning: decomposition declaration only available with -std=c++1z or -std=gnu++1z
     for (auto [l, r] : segs)
               ^
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:63:138:   required from here
/usr/include/c++/7/bits/predefined_ops.h:143:18: error: no match for call to ‘(main()::) (std::pair&, std::pair&)’
         { return bool(_M_comp(*__it1, *__it2)); }
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/7/bits/predefined_ops.h:143:18: note: candidate: void (*)(int, int) 
/usr/include/c++/7/bits/predefined_ops.h:143:18: note:   candidate expects 3 arguments, 3 provided
Main.cc:63:57: note: candidate: main()::
     sort(segs.begin(), segs.end(), [](auto lhs, auto rhs) { return make_pair(lhs.second, lhs.first) < make_pair(rhs.second, rhs.first); });
                                                         ^
Main.cc:63:57: note:   no known conversion for argument 1 from ‘std::pair’ to ‘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::pair; _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:63:138:   required from here
/usr/include/c++/7/bits/predefined_ops.h:215:11: error: no match for call to ‘(main()::) (std::pair&, std::pair&)’
  { return bool(_M_comp(__val, *__it)); }
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/7/bits/predefined_ops.h:215:11: note: candidate: void (*)(int, int) 
/usr/include/c++/7/bits/predefined_ops.h:215:11: note:   candidate expects 3 arguments, 3 provided
Main.cc:63:57: note: candidate: main()::
     sort(segs.begin(), segs.end(), [](auto lhs, auto rhs) { return make_pair(lhs.second, lhs.first) < make_pair(rhs.second, rhs.first); });
                                                         ^
Main.cc:63:57: note:   no known conversion for argument 1 from ‘std::pair’ to ‘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::pair; _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::pair; _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::pair; _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:63:138:   required from here
/usr/include/c++/7/bits/predefined_ops.h:177:11: error: no match for call to ‘(main()::) (std::pair&, std::pair&)’
  { return bool(_M_comp(*__it, __val)); }
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/7/bits/predefined_ops.h:177:11: note: candidate: void (*)(int, int) 
/usr/include/c++/7/bits/predefined_ops.h:177:11: note:   candidate expects 3 arguments, 3 provided
Main.cc:63:57: note: candidate: main()::
     sort(segs.begin(), segs.end(), [](auto lhs, auto rhs) { return make_pair(lhs.second, lhs.first) < make_pair(rhs.second, rhs.first); });
                                                         ^
Main.cc:63:57: note:   no known conversion for argument 1 from ‘std::pair’ to ‘int’