Accu, C++, Community, Conferences, Continuous Integration, Git, Unit Testing

Accu 2014 Conference Notes

I had the chance to go to ACCU 2014 the other week (full conference schedule is here) and I have to say it was one of the best conferences I've had the pleasure to attend. And while it did confirm my idea that C++ is getting the point of saturation and ridiculous excess (C++11 was… Continue reading Accu 2014 Conference Notes

C++, FTL, Programming

A Different Allocator Model

I originally posted this to #AltDevBlogADay on Saturday 30th July 2011. Quite a few years back I started developing a custom STL implementation which has eventually be adopted and used throughout our company. One of the most important things to get right when developing any kind of generic container library is the way memory is allocated. It… Continue reading A Different Allocator Model

C++, FTL, Programming

Simplifying the Flag Set

In the last few posts, I’ve covered the development of a type safe and easy to use flag set, and as a result it now contains 3 required template parameters, two of which declare default values. template < typename TEnum, int TMaxFlags = 8, typename TNames = union_names<bit_set_size<TMaxFlags>::Value> > class flag_set The last two properties… Continue reading Simplifying the Flag Set

C++, FTL, Programming

Debugging Type Safe Flags

In the previous post I described how I implemented a type safe, template driven, system for declaring and using flags in C++. But one of the main issues with the solution was not being able to see what flags were set when debugging. Which Flags Are Set? When setting bits to store flags there are… Continue reading Debugging Type Safe Flags

C++, FTL, Programming

A C++ Flag Set Example

As was pointed out in the last post, I... ahem... forgot to actually put down some working examples of the flag set, so I ended up describing something but not actually showing off the final product. So I thought a good start would be to include a few of the flag set unit tests (since… Continue reading A C++ Flag Set Example

C++, FTL, Programming

Type Safe Flags in C++

Using bits and shifting enums is a pretty standard way of storing and reading flags. It's quick, it's compact and the syntax isn't to difficult to pick up for people who haven't seen it before. But since a bit is only a bit and an enum is only an enum it's far to easy to… Continue reading Type Safe Flags in C++

C++, Development, Programming

The Evils of Unity Builds

Unity builds. I don't like them. Of all the tools at your disposal to make a build faster, this is the worst. And it's not just the "hey let's #include .cpp files" weirdness, but the way that it can make a well structure, modular code base become worse than spaghetti junction at rush hour, and… Continue reading The Evils of Unity Builds

C++, Programming

Over-Thinking Helper Functions

SAFE_DELETE and SAFE_FREE. What do those functions (macros?) say to you? What if you also have over-ridden calls to DELETE and FREE too? I think most people see a safe delete function as one that handles a null pointer safely - only calling delete or free when the ptr isn't null. Since this is totally… Continue reading Over-Thinking Helper Functions

C++, Programming

Be Explicit – Assignment Operators & Copy Constructors

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