hi all,
i try to make a vector-like array container, just for experiment :), i am not a experienced one indeed. When i search about a little bit, i found myself in deepless rabbit hole. my question is could you describe briefly what the allocator is. From this point i've tried to make a dynamiccaly growing container using allocator (of course my design is completely depends on what i understand about allocators) and using c-style malloc given below. Two of them using block of memory for size groving. Are these approaches right or completely wrong? can you briefly describe whether the answer is yes or no.
Sorry for the english,(i wish u understand what i meant above) and thanks in advance.
Do not use realloc/memcpy in C++ it will make your vector to fail miserably when copying non-TriviallyCopyable data. And I have feeling that it would fail with any non-POD type.