C++ can have some interesting behaviour, sometimes expected and sometimes not so. It's one of the reasons I enjoy using the language (maybe I like punishment) but it's one of the reasons many people don't. One of the often overlooked aspects of C++ is the way classes can be easily, and incorrectly, copied without you… Continue reading Be Explicit – Assignment Operators & Copy Constructors
It would be a good idea to start with a bit of history. In previous posts I've talked about our custom STL implementation which contains a basic vector, but also a fixed::vector which takes a fixed size and allocates all memory within that container (usually on the stack) and cannot increase or decrease in size.… Continue reading Unit Testing an Object with Dependent Behaviour
I recently implemented smart pointers into the FTL and was looking for a similar set to Boost's own due to their wide spread use. Obviously there are a few ways in which smart pointers can be implemented and I thought it would be interesting to document the reasons why I followed a particular route rather… Continue reading Anatomy of a Smart Pointer
Recently the topic of code size and its effect on the productivity and maintainability of a code base has been brought up in a number of forums and blogs across the internet. One of the more read would be the following (I won’t go into the issue I have with the author only ‘talking’ to… Continue reading Does Size Matter?
Allocators, by anyone's standards, are the most difficult and 'tacked-on' feature of the STL and it is because of this that different implementations have very different opinions on how they should be implemented. Obviously we want the FTL allocator model to be as simple as possible to actively encourage people to create their own custom… Continue reading FTL Allocators
It makes sense to start with the simplest and most obvious addition to the standard in the FTL which are fixed length containers. The FTL provides fixed length containers for the vector, queue, stack, bitset and array objects which allow developers to allocate all space for the container on the stack or within the allocation… Continue reading Fixed Length Containers
There is often a lot of debate amongst game developers about whether we should be using STL in development code or whether it can, in the long run, cause more problems than it solves. Unfortunately, ignoring the STL and dismissing it as a complicated and bloated set of containers can lead to development teams missing… Continue reading Replacing The STL