labath added a comment. Well, with these kinds of safeguards **I think** this could work. If I was the maintainer of std::vector in libstdc++ I am not sure if I would accept such a patch, but I am not, so feel free to try. :) Repository: rL LLVM https://reviews.llvm.org/D47492