Talk:cpp/container/map/operator=

According to http://www.cplusplus.com/reference/map/map/operator=/, move assignment invalidates references, pointers, iterators to elements of the other container.

I think this should be noted here (if this is correct, of course), because such condition is not obvious; one could think, for example, that pointers / references / iterators simply start pointing to elements of *this.

Same applies to other containers (vectors etc.)
 * cplusplus.com is a secondary source, same as cppreference.com. From implementation standpoint, if the allocators are compatible or POCMA is set, pointers and references do in fact start pointing to elements of *this as no copying is performed (and for list/forward_list, iterators could transfer as well), but I don't see standard wording proving or refuting that. --Cubbi (talk) 07:12, 29 December 2015 (PST)


 * correction, there is an open defect report LWG 2321 with proposed wording "no move constructor (or move assignment operator when allocator_traits::propagate_on_container_move_assignment::value is true) of a container (except for array) invalidates any references, pointers, or iterators referring to the elements of the source container. [Note: The end iterator does not refer to any element, so it may be invalidated". If this is accepted, cplusplus.com will be in the wrong. We may put a link to the DR in the notes section. --Cubbi (talk) 07:18, 29 December 2015 (PST)

Error in french/deutch/portugues/italian pages example
I think there is an error in the results section of code (for non english languages). The printed size is 4, while the map is size 3 visibly.