The assertion checks if an element has been added to vector. Since we
are merely manipulating the allocated data, the number of elements does
not change and the assertion check fails. Using the pointer to the
allocated data is a cleaner/clearer way of accomplishing this