<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Vector on Loki Astari</title><link>https://lokiastari.com/tags/Vector/</link><description>Recent content in Vector on Loki Astari</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Sun, 20 Mar 2016 22:26:43 -0700</lastBuildDate><atom:link href="https://lokiastari.com/tags/Vector/index.xml" rel="self" type="application/rss+xml"/><item><title>Vector - The Other Stuff</title><link>https://lokiastari.com/posts/Vector-TheOtherStuff/</link><pubDate>Sun, 20 Mar 2016 22:26:43 -0700</pubDate><guid>https://lokiastari.com/posts/Vector-TheOtherStuff/</guid><description>C++ By Example. The Vector Part 5. So, the C++ standard specifies a set of requirements for containers. Very few requirements are specified in terms of containers, so adhering to these exactly is not required (unless you want to be considered for the standard). But they provide an insight into what can be done with them, and if you support them, it will allow your container to be more easily used with some features of the language and standard library. I am not going to go over all of them here (that is left as an exercise for the reader), but I will go over the ones I would expect to see in a simple implementation (the kind you would see in a university project).</description></item><item><title>Vector - Simple Optimizations</title><link>https://lokiastari.com/posts/Vector-SimpleOptimizations/</link><pubDate>Sat, 19 Mar 2016 15:06:40 -0700</pubDate><guid>https://lokiastari.com/posts/Vector-SimpleOptimizations/</guid><description>C++ By Example. The Vector Part 4. We look at a couple of other types available in the template utility library that allow optimization via SFINAE.</description></item><item><title>Vector - Resize</title><link>https://lokiastari.com/posts/Vector-Resize/</link><pubDate>Sat, 12 Mar 2016 05:53:07 -0700</pubDate><guid>https://lokiastari.com/posts/Vector-Resize/</guid><description>C++ By Example. The Vector Part 3. Because resizing a vector is expensive, the standard 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 now and then, you still need to resize the internal buffer.</description></item><item><title>Vector - Resource Management Copy Swap</title><link>https://lokiastari.com/posts/Vector-ResourceManagementCopySwap/</link><pubDate>Mon, 29 Feb 2016 12:29:20 -0800</pubDate><guid>https://lokiastari.com/posts/Vector-ResourceManagementCopySwap/</guid><description>C++ By Example. The Vector Part 2. 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`. Unlike the other methods previously discussed, these methods have to deal with both construction and destruction of elements and the potential of exceptions interrupting the processes. The goal is to provide exception safe methods that provide the strong exception guarantee for the object and do not leak resources.</description></item><item><title>Vector - Resource Management Allocation</title><link>https://lokiastari.com/posts/Vector-ResourceManagementAllocation/</link><pubDate>Sat, 27 Feb 2016 12:00:31 -0800</pubDate><guid>https://lokiastari.com/posts/Vector-ResourceManagementAllocation/</guid><description>C++ By Example. The Vector - Part 1. Many new developers of C++ attempt to build a `Vector&amp;#39;- like container as a learning process. Getting a simple version of this working for POD types (like int) is not that complicated. The next step in getting this working for arbitrary data types takes a significant leap forward in thinking in C++, especially when you start looking at efficiency and exception safety. This set of five articles looks at building an efficient `Vector` implementation. I show some common mistakes and explain why and how to resolve the problems.</description></item></channel></rss>