Blog Posts

Vector - Simple Optimizations

So now that we have used `std::is_nothrow_move_constructible` we can also look at a couple of other types available in the template utility library. # Optimized Destruction Since we have to manuall

Read More

Vector - Resize

Because resizing a vector is expensive; the `std::vector` class uses exponential growth to minimize the number of times that the vector is resized: a technique we replicate in this version. But every

Read More

Vector - Resource Management Copy Swap

In the previous article I went over basic allocation for a `Vector` like class. In this article I want to put some detail around the copy assignment operator and resizing the underlying `Vector`. Unl

Read More

Vector - Resource Management Allocation

A lot of new developers to C++ attempt to build a `Vector` like container as a learning processes. Getting a simple version of this working for POD types (like int) is not that complicated. The next

Read More

Smart-Pointer - Constructors

In this article we examine constructors that are often missed or overlooked. This article looks at the use cases for these constructors and explains why the added functionality provides a meaningful a

Read More

Smart-Pointer - Shared Pointer

So in [the previous article](https://lokiastari.com/posts/Smart-Pointer-UniquePointer) I covered a basic `unique` pointer where the smart pointer retained sole ownership of the pointer. The other comm

Read More