It’s a bad idea to put objects directly in vectors and set user pointer to their addresses since when the vector grows, their addresses will change.
When I inherited my class from boost::noncopyable, I immediately got a compilation error saying std::vector cannot access the copy constructor of my class. But I was using emplace_back, how could that happen? Because explicitly defining or deleting copy constructor will prevent the compiler from implicitly defining move constructor and move assignment operator. Thus, when the vector tries to change the location of the object when it has to grow, it will find it impossible.