Why allow `propagate_on_container_swap == false` in Allocators, when it might cause undefined behaviour?
Note: Originally asked by Matt Mcnabb as a comment on Why can swapping standard library containers be problematic in C++11 (involving allocators)? . The Standard ( N3797 ) says that if progagate_on_container_swap inside an Allocator is std::false_type it will yield undefined behaviour if the two allocators involved doesn't compare equal. Why would the Standard allow such construct when it seems more than dangerous? 23.2.1p9 General Container Requirements [container.requirements.general] If allocator_traits<allocator_type>::propagate_on_container_swap::value is true , then the allocators of a