std::forward_list — erasing with a stored iterator
问题 I'm trying to keep a global list of a particular (base) class's instances so that I can track them down by iterating through this global list at any time. I believe the most proper way to address this is with an intrusive list. I have heard that one can encounter these creatures by digging into the Linux kernel, for example. In the situation where I'm in, I don't really need such guarantees of performance, and using intrusive lists will complicate matters somewhat for me. Here's what I've got