Diferente pentru blog/cpp11 intre reviziile #37 si #38

Nu exista diferente intre titluri.

Diferente intre continut:

s.insert(v);
==
You don't need to worry about collisions, $unordered_set$ and $unordered_map$ will take care of that for you.
You don't need to worry about collisions, $unordered_set$ and $unordered_map$ will take care of them for you.
 
h3. 5. lambda functions
 
You can now define anonymous functions to write less code. A common application is sorting according to multiple criteria.
 
== code(cpp) |
#include <algorithm>
 
using namespace std;
 
...
vector<int> a = {5, 3, 1, 3};
vector<int> b = {6, 1, 7, 2};
vector<int> indexes = {0, 1, 2, 3};
sort(indexes.begin(), indexes.end(), [&a, &b](int x, int y) -> bool {
  return a[x] < a[y] || (a[x] == a[y] && b[x] < b[y]);
});
==
(Often, a cleaner alternative to lambda functions is defining a class holding all the data needed for sorting and providing an implementation for the $<$ operator.)

Nu exista diferente intre securitate.

Topicul de forum nu a fost schimbat.