aliens.cpp: In function 'long long int take_photos(int, int, int, std::vector<int>, std::vector<int>)':
aliens.cpp:22:45: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11
for (int i = 0; i < n; i ++) arr.append({min(r[i], c[i]), max(r[i], c[i])});
^
aliens.cpp:22:79: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11
for (int i = 0; i < n; i ++) arr.append({min(r[i], c[i]), max(r[i], c[i])});
^
aliens.cpp:26:5: warning: lambda expressions only available with -std=c++11 or -std=gnu++11
});
^
aliens.cpp:26:6: error: no matching function for call to 'sort(std::vector<Point>::iterator, std::vector<Point>::iterator, take_photos(int, int, int, std::vector<int>, std::vector<int>)::<lambda(const Point&, const Point&)>)'
});
^
In file included from /usr/include/c++/5/algorithm:62:0,
from aliens.cpp:3:
/usr/include/c++/5/bits/stl_algo.h:4689:5: note: candidate: template<class _RAIter> void std::sort(_RAIter, _RAIter)
sort(_RandomAccessIterator __first, _RandomAccessIterator __last)
^
/usr/include/c++/5/bits/stl_algo.h:4689:5: note: template argument deduction/substitution failed:
aliens.cpp:26:6: note: candidate expects 2 arguments, 3 provided
});
^
In file included from /usr/include/c++/5/algorithm:62:0,
from aliens.cpp:3:
/usr/include/c++/5/bits/stl_algo.h:4718:5: note: candidate: template<class _RAIter, class _Compare> void std::sort(_RAIter, _RAIter, _Compare)
sort(_RandomAccessIterator __first, _RandomAccessIterator __last,
^
/usr/include/c++/5/bits/stl_algo.h:4718:5: note: template argument deduction/substitution failed:
aliens.cpp: In substitution of 'template<class _RAIter, class _Compare> void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = __gnu_cxx::__normal_iterator<Point*, std::vector<Point> >; _Compare = take_photos(int, int, int, std::vector<int>, std::vector<int>)::<lambda(const Point&, const Point&)>]':
aliens.cpp:26:6: required from here
aliens.cpp:26:6: error: template argument for 'template<class _RAIter, class _Compare> void std::sort(_RAIter, _RAIter, _Compare)' uses local type 'take_photos(int, int, int, std::vector<int>, std::vector<int>)::<lambda(const Point&, const Point&)>'
});
^
aliens.cpp:26:6: error: trying to instantiate 'template<class _RAIter, class _Compare> void std::sort(_RAIter, _RAIter, _Compare)'