A Better Boost Book

Friday, April 2nd, 2010

Boost is a excellent resource for C++ programming, but suffers from inconsistent documentation and a daunting array of sub-projects. Trying to make sense of it all is a fairly serious undertaking. I tried to get my head around it by writing my occasional series of boost blog posts, but now ...

Using Exceptions in C++

Monday, March 8th, 2010

C++ is big - it has been said that any given programmer only ever uses about 40% of the language's features. The trouble is that it is a different 40% for each person. Exceptions are a great example of this, some people swear by them while many coding standards specifically ...

The C++ Boost Libraries Part 6 – boost::any

Sunday, December 6th, 2009

In C++ if you have a variable that you say is of type "Person" (for instance), you can be fairly certain (more or less) that it always actually contains a Person (or perhaps a subclass of Person. If you have a container of Persons, then you know (more or less) ...

The C++ Boost Libraries Part 5 – boost::filesystem

Sunday, March 15th, 2009

The standard C++ iostreams library is very good (well, some would say sort-of good) at reading and writing a file's contents, but it does so in such a way as to completely ignore file names. I am sure there was a good reason for this omission, but whatever it was ...

The Boost C++ Libraries Intermission – Getting Boost Used

Sunday, February 15th, 2009

A former colleage of mine (Hi Nigel!) frequently wore the greatest geek tee-shirt I have ever seen to work. Ineptly reproduced here, it summarizes the realities of software development - when deciding what to implement technical considerations are often overruled by more prosaic influences. Take this comment by another old colleage. ...

The Boost C++ Libraries Part 4 – boost::date_time

Monday, February 9th, 2009

Living on a spherical planet can sometimes be a real pain in the neck. It makes what should be a simple concept, Time, inordinately complex. Timezones, daylight savings, leap years (and worse: leap seconds) all conspire to destroy any simple abstraction. So boost provides a complex one. First up is the ...

The C++ Boost Libraries Part 3 – string algorithms

Monday, January 19th, 2009

One of the many, many legitimate criticisms that could be leveled at C++ is that string handling is abysmal. Sure std::string can hold some chars for you, but there is a distinct lack of utility functions to actually do anything with those characters. Enter the Boost String Algorithm library, or ...

The C++ Boost Libraries (Part 2 – boost::assign)

Sunday, January 18th, 2009

We are still only in the low lands of boost territory but already we are coming across useful discoveries. Today's stop is boost::assign, one of those clever little pieces of code that makes life easier for everyone. Often you just want to load up a container with some small amount ...

The C++ Boost Libraries (Part 1 – Introduction)

Tuesday, January 13th, 2009

Although I like to think of myself of a jack-of-all-programming-trades, I must admit that I am mainly a C++ man. I have dabbled in the seductive dark side of Java and C#, but still prefer the mad poetry that C++ code can generate. A few years ago, C++ was showing ...