Issue #2 resolved

Bug in queue::push()

Anonymous created an issue

When you push many elements into queue, you memcpy them into correct places. The code for that is:

memcpy(array::begin(q._data) + insert, items, to_insert);

and

memcpy(array::begin(q._data), items, n);

It does not include the size of the type, so shouldn't it be

memcpy(array::begin(q._data) + insert, items, to_insert * sizeof(T));
memcpy(array::begin(q._data), items, n * sizeof(T));

Comments (1)

  1. Log in to comment