boost::exception

July 7, 2011 Leave a comment

In C++ there’s a no-throw restriction when it comes to data attached to exception objects.  Circumventing it could be tricky, and this is where the boost::exception shine by, not only allowing any arbitrary data to be moved up to the catch site, but also allow for data copying between threads.
Read more…

Categories: Frameworks

boost::enable_if

June 12, 2011 Leave a comment

The enable_if framework fall into the generic programming category, and is resolved at compile time.  It basically allow the enabling or disabling of templated members depending on a template type’s traits.  The framework rely on the C++ compiler SFINAE (substitution-failure-is-not-an-error) principle, which dictate that: if an invalid argument or return type is formed during the instantiation of a function template, the instantiation is removed from the overload resolution set instead of causing a compilation error.
Read more…

Categories: Frameworks

boost::dynamic_bitset

June 11, 2011 Leave a comment

Now this one is a quicky.  It’s a nearly identical template class as the standard std::bitset, except that its size (the number of bits it contains) is provided at runtime instead of compile time.

Categories: Frameworks

boost::disjoint_sets

June 11, 2011 Leave a comment

Reading head on the documentation of this framework, it became quickly obvious I was in trouble: I had no idea what a disjoint set was in the first place.  So I did some googling, and without surprise, I found the Wikipedia page to be the most understandable and helpful to give me a good overview.
Read more…

Categories: Frameworks

boost::date_time

June 11, 2011 Leave a comment

Dealing with time, through calculations, proper formatting, conversions between calendar types, can be a royal pain.  The rational behind the boost::date_time is it shouldn’t be harder than dealing with strings or integers.  And being portable between different platforms is a bonus too!
Read more…

Categories: Frameworks

boost::CRC

March 6, 2011 Leave a comment

This is one the boost framework I had already started using a few times in the past.  A good CRC generator is often handy, and I figured if boost is providing one, why look somewhere else?
Read more…

Categories: Frameworks

boost::conversion

March 6, 2011 Leave a comment

To stay clear from the old fashioned and highly unsafe C casting, the C++ offers a small array of specialized casting options, like static_cast, dynamic_cast, etc.  The Boost Conversion framework brings more on the table.
Read more…

Categories: Frameworks