fe47cee745a2b91cd9a2b98f7a82c9ad9fec726f |
|
26-Jan-2010 |
Nicolas Catania <niko@google.com> |
Use iterators in unitialized_copy. Previously, unitialized_copy assumed the args were pointers. Replace the const * with iterators. Fixed a bug, uninitialized_copy must return an iterator pass the last element inserted in dest. Previously we were returning the start of dest. Fixed a bug, we can use memmove only when the types pointed are POD but also when both source AND dest iterators are random access ones (i.e both source and dest use a contiguous array to store the values) The prev code would call memmove if the input was a vector<int> and output a linked list<int> which is wrong since the list element are stored in nodes, non contiguous area. Added a specialization when the 2 types are pod but the iterator are not random access ones (think linked list of ints). I was not sure if placement new degrades to assignement in that case so I provided a specialization that explicitly uses '='. In limits, added support for int and unsigned int. replaced C style casts with static_cast.
/external/astl/tests/test_uninitialized.cpp
|
2a4077a9186d6f6dff104bbd1a73484aae6d5c01 |
|
23-May-2009 |
Nicolas Catania <niko@google.com> |
Basic implementation of vector. Uses malloc/realloc for pod type. For classes uses placement new to insert new copies of the data. In the test package, renamed macros.h to common.h New memory file with uninitialized_copy and uninitialized_fill. Disabled the host target since it is used only on linux to run the valgrind tool and that I don't want to spend time making it compile on mac, cygwin ....
/external/astl/tests/test_uninitialized.cpp
|
8b5f35d0aa39e39119dc1e3e2fc4d283995faa2a |
|
12-Jun-2009 |
Nicolas Catania <niko@google.com> |
Revert "Basic implementation of vector." This reverts commit fd56a38d5dcb569b146634bb22c5d9cb1e138e3f.
/external/astl/tests/test_uninitialized.cpp
|
fd56a38d5dcb569b146634bb22c5d9cb1e138e3f |
|
23-May-2009 |
Nicolas Catania <niko@google.com> |
Basic implementation of vector. Uses malloc/realloc for pod type. For classes uses placement new to insert new copies of the data. In the test package, renamed macros.h to common.h New memory file with uninitialized_copy and uninitialized_fill.
/external/astl/tests/test_uninitialized.cpp
|