void StrVec::free()
{
if (elements) {
for_each(elements, first_free,
[this] (std::string* p) { alloc.destroy(p); });
alloc.deallocate(elements, cap - elements);
}
}
produced this error: Cruel Error :(
it was the second compiling error, if I removed the pointer, it will produced the first one. which is kind of -.-"
so, I tried with const pointer, const reference etc. and nothing works, yay! please help.