I just started learning C++, and was trying to implement a simple version of std::vector when I hit the bug I mention in the title. The following code sometimes triggers a E