Closed own2pwn closed 3 years ago
The standard only guarantees size <= capacity. What are the actual values you are seeing?
Also, I don't understand what this has to do with has_reserve
. Could you be more specific?
Sorry for the delayed reply. I thought it is expected that has_reserve < vector <E> >
would result in true
so we fall in and allocate memory in advance. But in my case that's not true
Ah, now I see. And you are right, has_reserve
is broken and there is no unit test for it.
https://github.com/taocpp/taopq/blob/40d28760e32466c6ff2d94f1cb67b486e5a37d18/include/tao/pq/result.hpp#L151
resulting vector's size != it's capacity