8 Jul
2014
8 Jul
'14
4:03 p.m.
On 5 July 2014 21:00, Niall Douglas wrote:
I am grateful for the clarification, but I think my original statement was correct yes? STL containers don't have a noexcept move constructor in C++ 11 due to allocators?
No, that's not correct. It's because some implementations either need at least one node even in an empty container (which requires the moved-from object to allocate memory after it's move from) or because debugging "safe STL" implementations perform memory allocation during a move. Although those reasons are related to memory allocation, they're not to do with Allocators, the same reasons would apply if everything used malloc().