kripken/emscripten — pull request #2688 by juj (2014-08-18 13:07:37+00:00)
Title: Libcxx map selfassign fix

Backports a fix from upstream libc++ that fixes self-assignment operators for std::map and a few others.

The following test shows how the previous code would fail:

#include
#include
#include

int main()
{
std::map m;
m[0] = 1;
printf("m.size(): %d\n", m.size());
m = m;
printf("m.size(): %d\n", m.size());
assert(m.size() == 1); // Does not hold, self-assignment cleared the contents of the map!
}