Given the hint I dropped yesterday about game data files, you may be wondering what lead to the change in subject of today’s post. Well I’ll first reassure you that data files will come up in a day or to. I shan’t tell you what serialization library we’ll be using just yet, but given the title of the present post, I’m sure you can make an informed guess
Regardless, we’ll be using the Boost libraries a fair bit anyway, so I thought I should take a second to make sure you know exactly what they are. I did post about them once before, but it was really just a brief mention. But Boost offers us so much extra – and often highly desirable – functionality that I felt it deserved a slightly longer introduction.
So, I’m sure by now you’ve worked out that by “Boost”, I refer to the Boost C++ Libraries. These 80 or so libraries, united under the Boost “flag”, are open source and peer reviewed. They are generally licensed under the Boost Software Licence, which allows for both commercial and non commercial use, in open source and closed source projects. Moreover, several prominent Boost authors are on the C++ standards committee and indeed many features of the Boost libraries have made it into the C++11 standard. While smart pointers may be new to standard C++, they’ve been in Boost for years. The same is true of lambda functions, threads, and more. (Of course, you should choose the standard C++ versions over the Boost versions now whenever possible.)
You probably want to know a few things you can do with Boost… Well, I’ll not say much for now. But here are a few of my favourite libraries
If you want to see a complete list of Boost libraries, just visit the Boost libraries page. Many are entirely header based, meaning you don’t have to compile any binaries. A few, however, involve source code as well so you’ll need to compile them into static or dynamic libraries. And to the “compile shy” ones among you, don’t think you can’t just skip it. Some of the most useful Boost libraries of all require compilation, and you’ll need them eventually. But don’t worry. It’s really not that hard, and over the next few days I’ll show both Windows and Unix users how.
Oh, and one other thing. I’m thinking of having a “Boost Week” in a bit. I’ll tell you about a library a day. I already have a few favourites I want to share with you, but if you want to know about any particular Boost library component, then just let me know in the comments!