AshleysBrain AshleysBrain

Niner since 2010


  • C9 Lectures: Stephan T. Lavavej - Standard Template Library (STL), 2 of n

    Great video - very clear, informative and well presented!  Good job!


    As for part 3, an interesting thing to cover might be unique_ptr - I've found it very useful, especially in a vector<unique_ptr<T>> where T is a complex type.  The guarantees are interesting - you get random access to elements, exception safety, and the elements never move memory address even if the vector reallocates.  (A common bug I've seen is someone takes the raw address of an element in a vector, does something which reallocates the vector, then the pointer is invalid - but only sometimes, when the vector happens to reallocate.)  Perhaps that could tie in to rvalue references if you mention it.