1#include<array>
2#include<functional>
3
4int main()
5{
6 std::array<int, 10> vec = { 1,2,3,4,5,6,7,8,9 };
7
8 std::sort(std::begin(vec),
9 std::end(vec),
10 [](int a, int b) {return a > b; });
11
12 for (auto item : vec)
13 std::cout << item << " ";
14
15 return 0;
16}
17
1sort(mMyClassVector.begin(), mMyClassVector.end(),
2 [](const MyClass & a, const MyClass & b) -> bool
3{
4 return a.mProperty > b.mProperty;
5});
6