mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-24 23:26:06 +00:00

This PR simplifies the implementation of std::vector's move constructor with an alternative allocator by invoking __init_with_size() instead of calling assign(), which ultimately calls __assign_with_size(). The advantage of using __init_with_size() lies in its internal use of an exception guard, which simplifies the code. Furthermore, from a semantic standpoint, it is more intuitive for a constructor to call an initialization function than an assignment function.