2. The map implementation uses a red-black tree class that eventually calls construct:
1 2 3 4
template <class _Tp1, class _Tp2>
inlinevoid construct(_Tp1* __p, const _Tp2& __value) {
new (__p) _Tp1(__value);
}
I'm not very clear on what is going on with line 3, but I'm guessing _Tp1(__value) is calling the copy constructor...
I didn't find the third one in the few minutes that I've been looking but it might have something to do with the tree re-balancing (although it looked like it used assignment for that).