So my first question is, can anyone else reproduce and confirm this issue? And finally, why does it happen and how can I fix it? For the life of me I can't figure out why the names go blank. And that it only seems to happen with MSVC makes me think it might be a compiler issue.
remove_if will not change the size of the container. Instead it returns an iterator to the new end of the sequence. You can remove the elements by passing this iterator to the erase function.
That seems to have done the trick. Thanks! It seems I hadn't read the docs for remove_if closely enough, and instead I naively used it how I *assumed* it would work. It turns out remove_if's behavior is actually similar to partition.